[spambayes-dev] Using reload() with modules from zips (Was More CVS branch/tags questions)

Tony Meyer tameyer at ihug.co.nz
Wed Dec 3 23:11:21 EST 2003


> Oops, may have spoken too soon.  Just noticed I'm getting the 
> following error whenever I save configuration in the binary 
> version.
[...]
> ImportError: No module named Options

I remember this from the last binary (from Mark) I tried, and I get it too.

IMO, this is a Python bug.  Try this:
"""
>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
"""

Looks to me like reload() doesn't work with module from zip's, which I
presume it should.

Could one of the Python experts correct me if I'm wrong here?  Otherwise I
presume I should open a (python) sf bug about this.

=Tony Meyer




More information about the spambayes-dev mailing list