Namespaces, classes, and using standard modules

Fredrik Lundh fredrik at pythonware.com
Wed Aug 13 15:54:49 CEST 2003


Dan Rawson wrote:

> I would have expected that importing os from the interactive prompt
> would have worked, and that the 'import os' statement in MyClass.py
> would have been ignored.

every module has its own namespace.

> Any comments or clues about how this SHOULD work would be appreciated!

the manual is a good place to start:

http://www.python.org/doc/current/tut/node8.html#SECTION008100000000000000000
http://www.python.org/doc/current/ref/naming.html

</F>








More information about the Python-list mailing list