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


Groups > comp.lang.python > #81347

unloading a module created with imp.new_module

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <patrickkidd@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.164
X-Spam-Level *
X-Spam-Evidence '*H*': 0.69; '*S*': 0.02; 'subject:module': 0.09; 'subject:created': 0.16; 'unload': 0.16; 'module': 0.19; 'references': 0.26; 'returned': 0.30; 'subject:skip:i 10': 0.31; 'thanks!': 0.32; 'subject:with': 0.35; 'received:google.com': 0.35; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'deleting': 0.60; 'header :Message-Id:1': 0.63; 'deleted?': 0.84; 'it\xe2\x80\x99s': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=p4k8rhW4+gv91hPzWYj56ORfA0wRMgtdBrJBQy5ZuZ0=; b=uq493QfxbYGleXIrg6usRcqwlPzL+680aAwOk4k3ooPfizt6OZVWUsHLahrhmSPwZK ugpmJeJT8h6c4TVN17/VD9HWab02IlTQX0d4GeZXSC2SiMkpnvDrMSFUaBzZHJIwhkmb 3j9nYSq9aC6YSrjTFFMY0sUMzFl7Xy3ZgWo3U63nG+L9LAMy8IXHXZ1vrrhja6Rse/4K u+UrA9ipdF8qhmDja+P8zeIe8uLWGOeG9Y0T5nArSDEOAxiTybpr/JfkFoEiq6sTXlZK 5icjcdxo3jkkNQr9gFwErY9U00RmF2k8ZrDyt0dR8coGpx+QbnJwG1ba9ftXnJLzxCC6 VFIA==
X-Received by 10.66.150.164 with SMTP id uj4mr22137369pab.14.1416725375431; Sat, 22 Nov 2014 22:49:35 -0800 (PST)
From Patrick Stinson <patrickkidd@gmail.com>
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding quoted-printable
Subject unloading a module created with imp.new_module
Date Sat, 22 Nov 2014 21:49:32 -0900
To python-list@python.org
Mime-Version 1.0 (Mac OS X Mail 8.1 \(1993\))
X-Mailer Apple Mail (2.1993)
X-Mailman-Approved-At Sun, 23 Nov 2014 10:04:29 +0100
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16173.1416733471.18130.python-list@python.org> (permalink)
Lines 8
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416733471 news.xs4all.nl 2977 [2001:888:2000:d::a6]:47617
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3075
X-Received-Body-CRC 726141281
Xref csiph.com comp.lang.python:81347

Show key headers only | View raw


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!

Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

unloading a module created with imp.new_module Patrick Stinson <patrickkidd@gmail.com> - 2014-11-22 21:49 -0900
  Re: unloading a module created with imp.new_module Steven D'Aprano <steve@pearwood.info> - 2014-11-24 03:47 +0000

csiph-web