Skip to content

Instantly share code, notes, and snippets.

@ebolyen
Created Sep 6, 2022
Embed
What would you like to do?
#!/usr/bin/env python
import sys
from qiime2.sdk import PluginManager
class SnoopImports:
def find_spec(self, name, path=None, target=None):
print(name, path)
return None
def main():
for entry in PluginManager.iter_entry_points():
print(f"=> LOADING {entry.module_name}")
entry.load()
sys.meta_path = [SnoopImports()] + sys.meta_path
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment