A beginner's problem...

Mike Meyer mwm at mired.org
Sat Dec 18 17:38:48 EST 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.
>>         <mike
> 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
-- 
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 mailing list