<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="IncrediMail 1.0" name=GENERATOR></HEAD>
<BODY style="BACKGROUND-POSITION: 0px 0px; FONT-SIZE: 12pt; MARGIN: 5px 10px 10px; FONT-FAMILY: Arial" bgColor=#ffffff background="" scroll=yes ORGYPOS="0">
<TABLE id=INCREDIMAINTABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
<TBODY>
<TR>
<TD id=INCREDITEXTREGION style="FONT-SIZE: 12pt; CURSOR: auto; FONT-FAMILY: Arial" width="100%">
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV id=receivestrings>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>From:</B></I> <A href="mailto:john@fouhy.net">John Fouhy</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>Date:</B></I> 02/19/06 17:14:39</DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>To:</B></I> <A href="mailto:tutor@python.org">Python Tutor</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>Subject:</B></I> Re: [Tutor] How can I make Python Shell see new version of functionsubroutine?</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Do you need to use copy and paste?&nbsp;&nbsp;For instance, say all your</DIV>
<DIV>functions are in a file called "factorization.py".&nbsp;&nbsp;In IDLE, you could</DIV>
<DIV>type "import factorization", and then you'll be able to call your</DIV>
<DIV>functions by typing things like "factorization.gcd(x, y)".</DIV>
<DIV>&nbsp;</DIV>
<DIV>*****************</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt;&gt;&gt; import "c:\\math\\factoring\\factor30.py"<BR>SyntaxError: invalid syntax<BR>&gt;&gt;&gt; </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt;&gt;&gt; import "c:\math\factoring\factor30.py"<BR>SyntaxError: invalid syntax<BR>&gt;&gt;&gt; </DIV>
<DIV>&nbsp;</DIV>
<DIV>******************</DIV>
<DIV>&nbsp;</DIV>
<DIV>If you change the code, you can reload the module by using the</DIV>
<DIV>'reload' builtin function.</DIV>
<DIV>&nbsp;</DIV>
<DIV>****************</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Could you explain this more.&nbsp;&nbsp; I'm not compiling or recompiling the function</DIV>
<DIV>subroutine.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>************</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Have you tried restarting IDLE? The first thing to do would be to</DIV>
<DIV>verify that the problem is what you think it is (as opposed to a bug</DIV>
<DIV>in your code, for example).</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>*******************</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Yes.&nbsp; I made a mistake.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></TD></TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD>
<TD id=INCREDISOUND vAlign=bottom align=middle></TD>
<TD id=INCREDIANIM vAlign=bottom align=middle></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>