Graham Dumpleton schrieb:
> What example did you use to test it? What version of Python are you
> using?

Yes, this changed. Python 2.3 includes the half imported module. Python 2.4 
does not.
But the traceback of the exception contains the needed information:

Here are the two example files:

# foo.py
import sys
print sys.version
try:
    import foomod
except ImportError, exc:
    mods=sys.modules.keys()
    mods.sort()
    print mods
    import traceback
    print traceback.extract_tb(sys.exc_info()[2])

# foomod.py
import does_not_exist


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to