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: 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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=E2=80=99t seem = to do the job, and it=E2=80=99s not in sys.modules, so where is the = dangling reference? Thanks!