Re: various re-import errors

tnb2d@henson.cs.virginia.edu
Wed, 13 Apr 94 14:27:28 EDT

Correct me if I'm worng (of course you will!), but I thought
deleting a module name from sys.modules and then 'import'ing the
module again (note: import, NOT reload) was the same thing as
reload(module). I was under the impression that sys.modules was the
gatekeeper for the module cash. Is that not the case?

lance@markv.com writes:
| > From: Guido.van.Rossum@cwi.nl
| > Date: Wed, 13 Apr 1994 15:20:59 +0200
| >
| > I've received various reports on core dumps and errors caused by
| > attempts to reload or re-import built-in or dynamically loaded
| > modules.
| >
| > (4)
| >
| > import stdwin
| > import sys
| > del sys.modules['stdwin']
| > import stdwin
| >
| > does not actually seem to fail but looks very scary because stdwin
| > cannot be initialized twice in the same process.
|
| Actually I use this feature.. PLEASEE do not remove this ability...
| And don't ask my WHY I do this.. but I have to.. It is gross but works..
| Actually I delete EVERY module in sys.modules except sys and then reload()
| them all..
|
| --
|
| Lance Ellinghouse lance@markv.com
| UNIX Systems Support support@markv.com
| Mark V Systems Limited Voice: +1 818 995 7671
| FAX: +1 818 995 4267
|

-------> Tommy.

"Subvert the parental paradigm - Refuse Birth."