Edgewall Software

Changeset 1076 for trunk/genshi/input.py


Ignore:
Timestamp:
Nov 10, 2009, 10:22:51 PM (14 years ago)
Author:
cmlenz
Message:

Convert a bunch of print statements to py3k compatible syntax.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/genshi/input.py

    r1075 r1076  
    8080    >>> parser = XMLParser(StringIO('<root id="2"><child>Foo</child></root>'))
    8181    >>> for kind, data, pos in parser:
    82     ...     print kind, data
     82    ...     print('%s %s' % (kind, data))
    8383    START (QName(u'root'), Attrs([(QName(u'id'), u'2')]))
    8484    START (QName(u'child'), Attrs())
     
    257257   
    258258    >>> xml = XML('<doc><elem>Foo</elem><elem>Bar</elem></doc>')
    259     >>> print xml
     259    >>> print(xml)
    260260    <doc><elem>Foo</elem><elem>Bar</elem></doc>
    261     >>> print xml.select('elem')
     261    >>> print(xml.select('elem'))
    262262    <elem>Foo</elem><elem>Bar</elem>
    263     >>> print xml.select('elem/text()')
     263    >>> print(xml.select('elem/text()'))
    264264    FooBar
    265265   
     
    281281    >>> parser = HTMLParser(StringIO('<UL compact><LI>Foo</UL>'))
    282282    >>> for kind, data, pos in parser:
    283     ...     print kind, data
     283    ...     print('%s %s' % (kind, data))
    284284    START (QName(u'ul'), Attrs([(QName(u'compact'), u'compact')]))
    285285    START (QName(u'li'), Attrs())
     
    410410   
    411411    >>> html = HTML('<body><h1>Foo</h1></body>')
    412     >>> print html
     412    >>> print(html)
    413413    <body><h1>Foo</h1></body>
    414     >>> print html.select('h1')
     414    >>> print(html.select('h1'))
    415415    <h1>Foo</h1>
    416     >>> print html.select('h1/text()')
     416    >>> print(html.select('h1/text()'))
    417417    Foo
    418418   
Note: See TracChangeset for help on using the changeset viewer.