Matthew Thorley wrote:
> So is elementtree a module of modules? I didn't know you could do that.
"elementtree" is a package. see:
http://docs.python.org/tut/node8.html#SECTION00840
for a bit more information.
--
http://mail.python.org/mailman/listinfo/python-list
So is elementtree a module of modules? I didn't know you could do that.
I just assumed that from elementtree import ElementTree imported a class
from the module elementtree.
It works now. Thanks guys.
Fredrik Lundh wrote:
> Matthew Thorley wrote:
>
>
>>I am trying to inherit from ElementTree so
Matthew Thorley wrote:
> I am trying to inherit from ElementTree so I can add some methods. This
> is the code I am trying to make work, and the following is the error I
> am getting.
>
> from elementtree import ElementTree
> class AcidTree(ElementTree):
> def write_string(self):
> ...
It looks like ElementTree is a module and not a class.
The same error message was posted here few weeks ago.
Actually, I discuss it in my Oxford lectures, page 30:
see
http://www.reportlab.org/~andy/accu2005/pyuk2005_simionato_wondersofpython.zip
(there also everything you want to know about new-s