A beginner's problem...
mwm at mired.org
Sat Dec 18 23:38:48 CET 2004
Amir Dekel <adekel at ort.org.il> writes:
> Mike Meyer wrote:
>> Doing a second import will find the module in sys.modules and not
>> bother looking in the file system. The solution is to reload(module)
>> instead of import module.
> What if I import using "from module import class"? It seems to me that
> I can't use reload then, or I just couldn't find the right syntax...
I'm pretty sure you'll have to import the module and reload it. "from
module import class" still puts the module in sys.modules, so trying
to import something from it again will find it in there.
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list