How to make a copy of a bindery node

0 views
Skip to first unread message

Luis Miguel Morillas

unread,
Nov 4, 2008, 6:32:39 PM11/4/08
to amar...@googlegroups.com
I want to make a copy of a bindery node, but bindery nodes haven't any
kind of clone() method.

If I use copy.copy() I get this error:

source
====
from amara import bindery
from copy import copy

doc = bindery.nodes.entity_base()
A = doc.xml_element_factory(None, u'A')
AA = copy(A)


error
====
python copy.py
Traceback (most recent call last):
File "copy.py", line 1, in <module>
from amara import bindery
File "/home/lm/Projects/testinAmara/lib/python2.5/site-packages/amara/__init__.py",
line 281, in <module>
from amara.tree import parse
File "/home/lm/Projects/testinAmara/lib/python2.5/site-packages/amara/tree.py",
line 9, in <module>
from amara._domlette import *
File "/home/lm/tmp/copy.py", line 1, in <module>
from amara import bindery
File "/home/lm/Projects/testinAmara/lib/python2.5/site-packages/amara/bindery/__init__.py",
line 8, in <module>
import nodes
File "/home/lm/Projects/testinAmara/lib/python2.5/site-packages/amara/bindery/nodes.py",
line 25, in <module>
from amara import tree
ImportError: cannot import name tree

Is it a bug?


Saludos,

--

Luis Miguel

Reply all
Reply to author
Forward
0 new messages