sphinx.pycode

Utilities parsing and analyzing Python code.

copyright:Copyright 2007-2016 by the Sphinx team, see AUTHORS.
license:BSD, see LICENSE for details.

Functions

TextIOWrapper(stream, encoding)
detect_encoding(readline) Like tokenize.detect_encoding() from Py3k, but a bit simplified.
get_module_source(modname) Try to find the source code for a module.
iteritems(d, **kw) Return an iterator over the (key, value) pairs of a dictionary.
prepare_commentdoc(s) Extract documentation comment lines (starting with #:) and return them as a list of lines.
prepare_docstring(s[, ignore]) Convert a docstring into lines of parseable reST.

Classes

AttrDocVisitor(number2name, *args) Visitor that collects docstrings for attribute assignments on toplevel and in classes (class attributes and attributes set in __init__).
BytesIO alias of StringIO
ModuleAnalyzer(source, modname, srcname[, ...])
StringIO([buf]) class StringIO([buffer])
sym
text_type alias of unicode

Exceptions

PycodeError