On 23 mai, 21:40, "Joel Koltner" <[EMAIL PROTECTED]> wrote: > How do I get Python to correctly re-load this function definition? > > In test.py: > > def testFunc(): > print 'My testFunc!' > > I execute... > > >>> from test import testFunc > >>> testFunc() > > My testFunc! > > Fine... now I change test.py to: > > def testFunc(): > print 'Modified testFunc!' > > ...and I'd like to reload testFunc. How do I do so? 'from test import > testFunc' keeps the old definition around, and 'reload test' of course doesn't > work becayse I didn't use 'import test' in the first place.
Import the module and use the fully qualied name. Or use Emacs with python-mode. -- http://mail.python.org/mailman/listinfo/python-list