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

P

plb

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top