| |
- currentframe()
- Return the frame object for the caller's stack frame.
- findsource(object)
- Find the first line of code corresponding to a given module, class,
- method, function, traceback, frame, or code object; return the entire
- contents of the source file and the starting line number. An IOError
- exception is raised if the source code cannot be retrieved.
- formatargspec(args, varargs=None, varkw=None, defaults=None, argformat=<built-in function str>, defaultformat=<function <lambda> at 80f5e58>, varargsformat=<function <lambda> at 80f5e78>, varkwformat=<function <lambda> at 80f5e98>)
- Make a nicely-formatted argument spec from the output of getargspec.
- formatargvalues(args, varargs=None, varkw=None, locals=None, argformat=<built-in function str>, valueformat=<built-in function repr>, varargsformat=<function <lambda> at 80f5f08>, varkwformat=<function <lambda> at 80f5f28>)
- Make a nicely-formatted argument spec from the output of getargvalues.
- getargs(co)
- Get information about the arguments accepted by a code object.
- Three things are returned: (args, varargs, varkw), where 'args' is
- a list of argument names (possibly containing nested lists), and
- 'varargs' and 'varkw' are the names of the * and ** arguments or None.
- getargspec(func)
- Get the names and default values of a function's arguments.
- A tuple of four things is returned: (args, varargs, varkw, defaults).
- 'args' is a list of the argument names (it may contain nested lists).
- 'defaults' is an n-tuple of the default values of the last n arguments.
- 'varargs' and 'varkw' are the names of the * and ** arguments or None.
- getargvalues(frame)
- Get information about arguments passed into a particular frame.
- getblock(lines)
- Extract the block of code at the top of the given list of lines.
- getclasstree(classes)
- Arrange the given list of classes into a hierarchy of nested lists.
- Where a nested list appears, it contains classes derived from the class
- whose entry immediately precedes the list. Each entry is a 2-tuple
- containing a class and a list of bases, where the list of bases only
- appears if the class inherits in a way not already implied by the tree
- structure (i.e. it inherits from multiple bases, or inherits from a
- class not present in the tree). Exactly one entry appears in the
- returned structure for each class in the given list.
- getcomments(object)
- Look for preceding lines of comments in an object's source code.
- getdoc(object)
- Get the documentation string for an object.
- getfile(object)
- Try to guess which (text or binary) file an object was defined in.
- getframe(frame, context=1)
- For a given frame or traceback object, return the filename, line
- number, function name, a given number of lines of context from the
- source code, and the index of the line within the lines of context.
- getinnerframes(traceback, context=1)
- Get a list of records for a traceback's frame and all lower frames.
- Each record contains a frame object, filename, line number, function
- name, the requested amount of context, and index within the context.
- getmembers(object, predicate=<function <lambda> at 80ec748>)
- Return all members of an object as (key, value) pairs sorted by key.
- Optionally, only return members that satisfy a given predicate.
- getouterframes(frame, context=1)
- Get a list of records for a frame and all higher (calling) frames.
- Each record contains a frame object, filename, line number, function
- name, the requested amount of context, and index within the context.
- getsource(object)
- Try to get the source code corresponding to a module, class, method,
- function, traceback, frame, or code object. Return a list of lines of
- text and the line number of the first line. An IOError exception is
- raised if the source code cannot be retrieved.
- getsourcefile(object)
- Try to guess which Python source file an object was defined in.
- indentsize(line)
- Return the indent size, in spaces, at the start of a line of text.
- isbuiltin(object)
- Is the object a callable function providing no special attributes?
- isclass(object)
- Is the object a class with the __module__ special attribute?
- iscode(object)
- Is the object a code object with the co_* set of special attributes?
- isframe(object)
- Is the object a frame object with the f_* set of special attributes?
- isfunction(object)
- Is the object a function with the func_* set of special attributes?
- ismethod(object)
- Is the object a method with the im_* set of special attributes?
- ismodule(object)
- Is the object a module with the __file__ special attribute?
- isroutine(object)
- Is the object any of the built-in or user-defined function types?
- istraceback(object)
- Is the object a traceback with the tb_* set of special attributes?
- stack(context=1)
- Return a list of records for the stack above the caller's frame.
- strtuple(object, convert=<built-in function str>)
- Recursively walk a tuple, stringifying each element.
- trace(context=1)
- Return a list of records for the stack below the current exception.
- walktree(classes, children, parent)
- Recursive helper function for getclasstree().
|