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
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
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
...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
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
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
--