I have a Python module 'something.py' and I'd like to get a list of all of the functions I've written in this file. I've followed this SO post explaining the standard ways of doing this.
The trouble is I have import functions in something.py, so when trying to list my functions I also list the imported functions I don't care about. How can I get a list of the functions that I wrote in something.py?
from inspect import getmembers, isfunction; import something; functions_list = getmembers(something, isfunction)provides a list only of functions in something module (i.e. functions of imports not included).