<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>What about using the reimport library?</div><div><br></div><div><a href="http://code.google.com/p/reimport/">http://code.google.com/p/reimport/</a></div><div><br></div><div>Cheers,</div><div>William</div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> AlF <spamgrinder.trylater@ggmail.com><br><b><span style="font-weight: bold;">To:</span></b> python-list@python.org<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, August 10, 2009 1:48:31 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: reloading the module imported as 'from ... import
 ...'<br></font><br>Steven D'Aprano wrote:<br>> On Sun, 09 Aug 2009 20:43:41 -0700, AlF wrote:<br>> <br>>> Hi,<br>>> <br>>> what is the best way to reload the module imported using 'from ...<br>>> import ...'<br>> <br>> <br>> Have you tried "from ... import ..." again?<br>> <br><br>I have not because of an assumption that "import" imports the module just once. In fact this still works that way:<br><br>here is a terminal 1:<br><br>$ cat > a.py<br>a=1<br>$ cat > a.py<br>a=2<br>$<br><br><br>and terminal 2:<br><br>>>> from a import a<br>>>> a<br>1<br>>>> a<br>1<br>>>> from a import a<br>>>> a<br>1<br>>>><br><br>In spite of changing a.py in fly, the imported a is still 1<br><br><br>-- <a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></div></div><div
 style="position:fixed"></div></div><br>

      </body></html>