Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6dcd05c

Browse files
committed
minor update
1 parent e2bbfbe commit 6dcd05c

2 files changed

Lines changed: 22 additions & 21 deletions

File tree

extra/xmlobject/xmlobject.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,37 @@
2525
2626
Example usage::
2727
28-
>>> from xmlobject import XMLFile
28+
>> from xmlobject import XMLFile
2929
30-
>>> x = XMLFile(path="sample.xml)
30+
>> x = XMLFile(path="sample.xml")
3131
32-
>>> print x
32+
>> print x
3333
<xmlobj.XMLFile instance at 0xb7ccc52c>
3434
35-
>>> print x.root
35+
>> print x.root
3636
<XMLNode: rapsheets>
3737
38-
>>> print x.root._children
38+
>> print x.root._children
3939
[<XMLNode: text>, <XMLNode: person>, <XMLNode: text>,
4040
<XMLNode: person>, <XMLNode: text>]
4141
42-
>>> print x.root.person
42+
>> print x.root.person
4343
[<XMLNode: person>, <XMLNode: person>]
4444
45-
>>> print x.root.person[0].name
45+
>> print x.root.person[0].name
4646
John Smith
4747
48-
>>> john = x.root.person[0]
48+
>> john = x.root.person[0]
4949
50-
>>> john.height = 184
50+
>> john.height = 184
5151
52-
>>> c = john._addNode("crime")
52+
>> c = john._addNode("crime")
5353
54-
>>> c.name = "Grand Theft Auto"
54+
>> c.name = "Grand Theft Auto"
5555
56-
>>> c.date = "4 May, 2005"
56+
>> c.date = "4 May, 2005"
5757
58-
>>> print x.toxml()
58+
>> print x.toxml()
5959
<?xml version="1.0" ?>
6060
<rapsheets>
6161
<person age="42" height="184" name="John Smith">
@@ -70,7 +70,7 @@
7070
</person>
7171
</rapsheets>
7272
73-
>>>
73+
>>
7474
7575
"""
7676

@@ -360,18 +360,18 @@ def __setattr__(self, attr, val):
360360
<child>foo</child>
361361
</somenode>
362362
363-
>>> somenode
363+
>> somenode
364364
<XMLNODE: somenode>
365-
>>> somenode.child
365+
>> somenode.child
366366
<XMLNODE: child>
367-
>>> somenode.child._text
367+
>> somenode.child._text
368368
'foo'
369-
>>> somenode._toxml()
369+
>> somenode._toxml()
370370
u'<somenode><child>foo</child></somenode>'
371-
>>> somenode.child._text = 'bar'
372-
>>> somenode.child._text
371+
>> somenode.child._text = 'bar'
372+
>> somenode.child._text
373373
'bar'
374-
>>> somenode.child._toxml()
374+
>> somenode.child._toxml()
375375
u'<somenode><child>bar/child></somenode>'
376376
377377
"""

lib/core/profiling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import os
2626
import cProfile
2727

28+
from lib.core.common import getUnicode
2829
from lib.core.data import conf
2930
from lib.core.data import logger
3031
from lib.core.data import paths

0 commit comments

Comments
 (0)