def deactivate(*paths):
""" CAREFUL : even if we remove our path_hooks, the created finder are still cached in sys.path_importer_cache."""
#if sys.version_info >= (2, 7, 12): # TODO : which exact version matters ?
sys.path_hooks.remove(ROSImportFinder)
# else: # older (trusty) version
# sys.path_hooks.remove(_ros_finder_instance_obsolete_python)
if paths:
sys.path.remove(*paths)
sys.meta_path.remove(ros_distro_finder)
评论列表
文章目录