Source Code Inspection

This module adds several functions for interactive source code inspection.

sympy.utilities.source.get_class(lookup_view)[source]

Convert a string version of a class name to the object.

For example, get_class(‘sympy.core.Basic’) will return class Basic located in module sympy.core

sympy.utilities.source.get_mod_func(callback)[source]

splits the string path to a class into a string path to the module and the name of the class.

Examples

>>> from sympy.utilities.source import get_mod_func
>>> get_mod_func('sympy.core.basic.Basic')
('sympy.core.basic', 'Basic')
sympy.utilities.source.source(object)[source]

Prints the source code of a given object.