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...
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 ju
""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
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 chan
> ...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 impo
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 re