[ python-Bugs-856103 ] reload() fails with modules from zips
SourceForge.net
noreply at sourceforge.net
Mon Dec 8 03:48:35 EST 2003
Bugs item #856103, was opened at 2003-12-08 21:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856103&group_id=5470
Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tony Meyer (anadelonbrin)
Assigned to: Nobody/Anonymous (nobody)
Summary: reload() fails with modules from zips
Initial Comment:
If you call reload() with a module that was imported from
a zip, it fails with a "no such module" error. Although
zips are typically read-only, it is possible that a zip could
be modified during a run, and a reload be necessary. If
this is considered unnecessary, then I think a more
informative "can't reload from zip" error would be better
than a 'no such module" one.
"""
>set PYTHONPATH=path/to/spambayes.zip
>python
>>> from spambayes import Options
>>> Options
<module 'spambayes.Options'
from 'c:\spambayes\windows\py2exe\dist\lib\spambayes
.zip\spambayes\Options.pyc'>
>>> reload(Options)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named Options
"""
This is with Python 2.3.2 and WinXP.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856103&group_id=5470
More information about the Python-bugs-list
mailing list