[SciPy-User] How to make sure that a module gets re-loaded

Gaetan Cesar Koers ckoers@telenet...
Sat Oct 24 16:58:57 CDT 2009


Hello,


How to make sure that a module gets re-loaded when I've edited it's 
source code?

I thought that either 'import' or 'reload' could do this, but I have the 
idea that only a cold shell restart helps.

The time I've lost by chasing a bug that afterwards proves to be a 
remnant of a previous module version!


2nd, related perhaps:

The code I'm working on, in module 'M.py', is located in a directory 
named 'M'. From the parent of directory 'M', when I do 'import M' or 
'reload M', how can I make sure that Python imports/reloads 'M/M.py'?



Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08)
shell = IPython 0.8.1


thanks in advance for your feedback

bye C





More information about the SciPy-User mailing list