Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81418 > unrolled thread

Re: unloading a module created with imp.new_module

Started byNed Batchelder <ned@nedbatchelder.com>
First post2014-11-23 21:56 -0500
Last post2014-11-23 21:56 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: unloading a module created with imp.new_module Ned Batchelder <ned@nedbatchelder.com> - 2014-11-23 21:56 -0500

#81418 — Re: unloading a module created with imp.new_module

FromNed Batchelder <ned@nedbatchelder.com>
Date2014-11-23 21:56 -0500
SubjectRe: unloading a module created with imp.new_module
Message-ID<mailman.16218.1416797780.18130.python-list@python.org>
On 11/23/14 1:49 AM, Patrick Stinson wrote:
> If I create a module with imp.new_module(name), how can I unload it so that all the references contained in it are set to zero and the module is deleted? deleting the reference that is returned doesn’t seem to do the job, and it’s not in sys.modules, so where is the dangling reference?
>
> Thanks!
>

This sounds tricky, and possible very difficult to do properly.  Do you 
mind if I ask what the larger problem is?  Python might not be very good 
at having modules come and go as you want.

-- 
Ned Batchelder, http://nedbatchelder.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web