Skip to content

Instantly share code, notes, and snippets.

@blue-bird1
Last active October 30, 2018 15:36
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 blue-bird1/9de222884c4507700afbd18383910b94 to your computer and use it in GitHub Desktop.
Save blue-bird1/9de222884c4507700afbd18383910b94 to your computer and use it in GitHub Desktop.
print file all fucntion __doc__
import inspect
def get_module_function__doc(module):
module = __import__(module)
name_func_tuples = inspect.getmembers(module, inspect.isfunction)
name_func_tuples = [t[1] for t in name_func_tuples if inspect.getmodule(t[1]) == module]
tmp = ''
for _ in name_func_tuples:
tmp = tmp+_.__doc__
print(tmp)
get_module_function__doc('command')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment