In my package, myapp, I have a module, logging.py. That module, naturally, imports the library module logging with an 'import logging' statement. However, when I use 'import myapp.logging' in my script, the myapp.logging module tries to import itself rather than the library logging module.
How can I prevent this from happening other than using a name that
doesn't conflict?
Did you try the built-in 'imp' module?
http://docs.python.org/lib/module-imp.html
I believe that 'load_module' is your very best friend. :-)
Another idea: rename your modules so they do not conflict with standard modules.
Best,
Laci 2.0
-- _________________________________________________________________ Laszlo Nagy web: http://designasign.biz IT Consultant mail: [EMAIL PROTECTED]
Python forever!
-- http://mail.python.org/mailman/listinfo/python-list