Re: Reloading function obtained via 'from xxx import yyy'

2008-05-24 Thread bukzor
On May 23, 3:44 pm, Joel Koltner [EMAIL PROTECTED] wrote: Martin v. Löwis [EMAIL PROTECTED] wrote in messagenews:[EMAIL PROTECTED] Try all three of them, in sequence: Thanks, will do. If you absolutely don't want to import test, write I can live with the import, I just don't want to

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-24 Thread Benjamin Kaplan
On Fri, May 23, 2008 at 3:40 PM, 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

Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread Joel Koltner
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

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread Martin v. Löwis
...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. Try all three of them, in sequence: import test reload(test) from test import

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread [EMAIL PROTECTED]
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

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread Joel Koltner
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try all three of them, in sequence: Thanks, will do. If you absolutely don't want to import test, write I can live with the import, I just don't want to have to type out the full names all the time. ---Joel --