Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 478 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 478 Bytes

deimport

A simple package to "deimport" already imported python packages.

Installing using PyPi:

pip install deimport

Usage

from deimport.deimport import deimport
deimport(foo,verbose=True)

Limitations:

deimport removes the module and its submodules from the globals and sys.modules. sometimes that trips the python module loading cache. if that happens all you have to do is something like :

try:
  import foo
except:
  import foo