Handling import conflicts when module has the same name as a library module that it needs to import?

plb plb at iotk.com
Tue Feb 8 08:08:26 EST 2005


All:

I am struggling with an import problem...

In my package, myapp, there is a module called logging. This module,
naturally, imports the standard library module logging.  However, when
I try 'import myapp.logging', the 'import logging' statement appears to
be finding the myapp.logging module instead of the one in the standard
library.

How can I ensure that my logging module doesn't try to import itself?

--PLB




More information about the Python-list mailing list