[Tutor] How can I make Python Shell see new version of functionsubroutine?
Kermit Rose
kermit at polaris.net
Sun Feb 19 23:27:34 CET 2006
From: John Fouhy
Date: 02/19/06 17:14:39
To: Python Tutor
Subject: Re: [Tutor] How can I make Python Shell see new version of
functionsubroutine?
Do you need to use copy and paste? For instance, say all your
functions are in a file called "factorization.py". In IDLE, you could
type "import factorization", and then you'll be able to call your
functions by typing things like "factorization.gcd(x, y)".
*****************
>>> import "c:\\math\\factoring\\factor30.py"
SyntaxError: invalid syntax
>>>
>>> import "c:\math\factoring\factor30.py"
SyntaxError: invalid syntax
>>>
******************
If you change the code, you can reload the module by using the
'reload' builtin function.
****************
Could you explain this more. I'm not compiling or recompiling the function
subroutine.
************
Have you tried restarting IDLE? The first thing to do would be to
verify that the problem is what you think it is (as opposed to a bug
in your code, for example).
*******************
Yes. I made a mistake.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060219/a72dca92/attachment.htm
More information about the Tutor
mailing list