Last active
October 30, 2018 15:36
-
-
Save blue-bird1/9de222884c4507700afbd18383910b94 to your computer and use it in GitHub Desktop.
print file all fucntion __doc__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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