By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,172 Members | 727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,172 IT Pros & Developers. It's quick & easy.

Unimport module

P: n/a
Hi,

I have some code like that to do kind of plugins load :

dir = listdir('/path/')
for i in dir:
sys.path.append('/path/' + i "/")
import Module
doStuff()
sys.path.remove('/path/' + i "/")

it's obviously not working since it get only the first import Module
while the others doent get replaced, the only solution for me was too :

sys.modules.pop('Module')

which after it does works fine. But my question is what's happenning in
the internals, does it free the memory of Module to do a sys.modules.pop ?

Cheers, Chmouel.

PS: Please Mail-Copy-To: i am not subscribed to the list

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.