| Store | Cart

Deprecating reload() ???

From: Peter Hansen <pet...@engcorp.com>
Fri, 12 Mar 2004 06:58:06 -0500
user at domain.invalid wrote:
> Ellinghaus, Lance wrote:> >> I agree that it does not really work as most people think it does, but >> how>> would you perform the same task as reload() without the reload()?>> Would this be done by "del sys.modules['modulename']" and then perform an>> 'import'?> > Ah, interesting! I've been doing this:> > del modulename; import modulename> > but it doesn't pick up any recent changes to the modulename.py file.> > That's a better solution than exiting Python and starting it up again. 

Just to clarify, *neither* of the above solutions does anything useful, 
as far as I know.  Only reload() will really reload a module.  Certainly 
the del mod/import mod approach is practically a no-op...

-Peter

Recent Messages in this Thread
John Roth Mar 11, 2004 09:43 pm
David MacQuigg Mar 12, 2004 12:45 am
Mel Wilson Mar 12, 2004 03:29 pm
u...@domain.invalid Mar 12, 2004 05:27 am
Peter Hansen Mar 12, 2004 11:58 am
Skip Montanaro Mar 12, 2004 02:20 pm
David MacQuigg Mar 12, 2004 05:25 pm
John Roth Mar 12, 2004 06:24 pm
Peter Hansen Mar 12, 2004 06:29 pm
wmwd...@sneakemail.com ) (Greg Ewing (using news.cis.dfn.de) Mar 15, 2004 01:19 am
Michael Hudson Mar 15, 2004 12:45 pm
David MacQuigg Mar 12, 2004 12:43 pm
Peter Hansen Mar 12, 2004 01:45 pm
David MacQuigg Mar 12, 2004 03:54 pm
Skip Montanaro Mar 12, 2004 05:42 pm
John Roth Mar 12, 2004 06:29 pm
Peter Hansen Mar 12, 2004 06:34 pm
David MacQuigg Mar 12, 2004 07:08 pm
Paul Miller Mar 12, 2004 07:21 pm
Hung Jung Lu Mar 15, 2004 07:01 am
Skip Montanaro Mar 15, 2004 11:57 am
David MacQuigg Mar 12, 2004 07:54 pm
Skip Montanaro Mar 12, 2004 09:17 pm
David MacQuigg Mar 13, 2004 03:19 pm
Skip Montanaro Mar 13, 2004 04:30 pm
David MacQuigg Mar 13, 2004 06:27 pm
Skip Montanaro Mar 13, 2004 08:27 pm
David MacQuigg Mar 13, 2004 01:08 am
Skip Montanaro Mar 13, 2004 03:56 am
David MacQuigg Mar 13, 2004 03:12 pm
Michael Hudson Mar 12, 2004 01:39 pm
David MacQuigg Mar 17, 2004 06:26 pm
Messages in this thread