April 2, 2020
Print source code of a function
When we want to see source code of the function called "func" in "foo" library.
import inspect import foo print inspect.getsource(foo.func)
April 2, 2020, 03:55
0 views
0 reactions
When we want to see source code of the function called "func" in "foo" library.
import inspect import foo print inspect.getsource(foo.func)