def unload(module):
for m in list(sys.modules.keys()):
if m == module or m.startswith(module+"."):
del sys.modules[m]
for p in list(sys.path_importer_cache.keys()):
if module in p:
del sys.path_importer_cache[p]
try:
del module
except:
pass
评论列表
文章目录