Hi,
I have several different python libraries that I use, and didn't want to keep them all open at the same time.
Is there a way I can check if a library is already opened?
Thanks
Herb
Hi,
I have several different python libraries that I use, and didn't want to keep them all open at the same time.
Is there a way I can check if a library is already opened?
Thanks
Herb
Hi Herb,
The python import statement only loads a module once.
Python does not officially support unloading modules.
You can however test to see if a module is loaded using:
type(sys.modules["modulename"])
and if there are no references to it:
del sys.modules["modulename"]
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Bookmarks