[Tutor] re-import

Glenn T Norton gtnorton at earthlink.net
Mon Oct 30 03:34:26 CET 2006


jhl wrote:

> Hi-
>
> How is the 1st import of a module removed so that new edits on the 
> module can be re-imported?
>
> DETAIL:
>
> I am working on a module/file and importing it into a python shell, 
> trying it out and then tweaking/editing the module.  Then to see the 
> effects of the edits, I want to re-import the file and find that the 
> original import persists-- can't get the new/edited module without 
> exiting and restarting the python shell.  I've used dir() and del'd 
> every reference to the module (and its contents/defs), but the 1st 
> import seems to remain as the source for future imports.
>
> Thanks in advance for any & all help,
> -J
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>  
>
Read about reload here:
http://docs.python.org/lib/built-in-funcs.html

Good Luck,
Glenn

-- 
"Ketchup. For the good times... " - Ketchup Advisory Board 
Glenn Norton
Application Developer
Nebraska.gov
1-402-471-2777
glenn at nebraska.gov



More information about the Tutor mailing list