Weird scope error

Rory McKinley rorymckinleylists at gmail.com
Sat Apr 5 22:37:57 CEST 2008


Gary Herron wrote:
<snip>
> Python has no such thing as this kind of a "global scope".   (True, each 
> module has its own global scope, but that's not what you are talking 
> about.)   So you'll have to fix the import for *every* module that needs 
> access to ElementTree.    You might make the change as you mentioned 
> above for each, but really, I think you should just make ElementTree 
> directly importable by either installing it normally or including 
> .../xml/etree in your PYTHONPATH
<snip>

Thank you Gary and Kay for the response

My apologies for being dense with regard to this: If I understand your 
responses correctly, the "from xml.etree import ElementTree" that I 
inserted is failing? And that is why I am getting the NameError in the 
method? Is Python just ignoring the failure?



Rory



More information about the Python-list mailing list