Skip to content

Instantly share code, notes, and snippets.

@graphaelli
Created May 23, 2017 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graphaelli/6a02d8b8fd92ee4ba3b3fc0543c6fe74 to your computer and use it in GitHub Desktop.
Save graphaelli/6a02d8b8fd92ee4ba3b3fc0543c6fe74 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import importlib
import sys
def actions(module):
mod = importlib.import_module(module)
for attrib in dir(mod):
if mod.Action == type(getattr(mod, attrib)):
yield attrib
if __name__ == '__main__':
print("\n".join(actions('awacs.' + sys.argv[1])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment