inspect.findsource()¶
-
inspect.findsource(object)[source]¶ Return the entire source file and starting line number for an object.
The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is raised if the source code cannot be retrieved.