Python Sprawdź kod źródłowy
#baz.py
import inspect
class foo:
def bar():
print 'Hello'
print(inspect.getsource(foo))
Faithful Fly
#baz.py
import inspect
class foo:
def bar():
print 'Hello'
print(inspect.getsource(foo))
from inspect import getmembers, isfunction
from my_project import my_module
functions_list = [o for o in getmembers(my_module) if isfunction(o[1])]