-
dycco
index.html
Package
Package
PUBLIC
No package docstring; 1/3 module documented
-
dycco.__main__
dycco.__main__.html
Module
Module
PRIVATE
Undocumented
-
dycco.cli
dycco.cli.html
Module
Module
PUBLIC
Undocumented
-
dycco.dycco
dycco.dycco.html
Module
Module
PUBLIC
**Dycco** is another Python port of [Docco][docco], the quick-and-dirty, hundred-line-long, literate-programming-style documentation generator. This particular version has been updated to work with Python 3 (as of 2026).
-
dycco.dycco.ascii_location
dycco.dycco.html#ascii_location
Attribute
Variable
PUBLIC
Undocumented
-
dycco.dycco.ascii_module
dycco.dycco.html#ascii_module
Attribute
Variable
PUBLIC
Undocumented
-
dycco.dycco.DYCCO_ROOT
dycco.dycco.html#DYCCO_ROOT
Attribute
Constant
PUBLIC
Undocumented
-
dycco.dycco.DYCCO_RESOURCES
dycco.dycco.html#DYCCO_RESOURCES
Attribute
Constant
PUBLIC
Undocumented
-
dycco.dycco.DYCCO_TEMPLATE
dycco.dycco.html#DYCCO_TEMPLATE
Attribute
Constant
PUBLIC
Undocumented
-
dycco.dycco.DYCCO_CSS
dycco.dycco.html#DYCCO_CSS
Attribute
Constant
PUBLIC
Undocumented
-
dycco.dycco.document
dycco.dycco.html#document
Function
Function
PUBLIC
Generates documentation for the Python files at the given `input_paths` by parsing each file into pairs of documentation and source code and rendering those pairs into an HTML file.
-
dycco.dycco.parse
dycco.dycco.html#parse
Function
Function
PUBLIC
Parse the given source code in two passes. The first pass walks the *Abstract Syntax Tree* of the code, gathering up and noting the location of any docstrings. The second pass processes the code line by line, grouping the code into sections based on docstrings and comments.
-
dycco.dycco.parse_docstrings
dycco.dycco.html#parse_docstrings
Function
Function
PUBLIC
Parse the given `src` to find any docstrings, add them to the appropriate place in `sections`, and return a `set` of line numbers where the docstrings are. **Note:** Modifies `sections` in place.
-
dycco.dycco.parse_code
dycco.dycco.html#parse_code
Function
Function
PUBLIC
Parse the given `src` line by line to gather source code and comments into the appropriate places in `sections`. Any line numbers in `skip_lines` are skipped. **Note:** Modifies `sections` in place.
-
dycco.dycco.render
dycco.dycco.html#render
Function
Function
PUBLIC
Renders the given sections, which should be the result of calling `parse` on a source code file, into HTML.
-
dycco.dycco.preprocess_docs
dycco.dycco.html#preprocess_docs
Function
Function
PUBLIC
Preprocess the given `docs`, which should be a `list` of strings, by joining them together and running them through Markdown or asciidoc3, unless `raw` is True, in which case we just return the text
-
dycco.dycco.preprocess_code
dycco.dycco.html#preprocess_code
Function
Function
PUBLIC
Preprocess the given code, which should be a `list` of strings, by joining them together and running them through the Pygments syntax highlighter unless `raw` is True, when we just return the text
-
dycco.dycco.make_sections
dycco.dycco.html#make_sections
Function
Function
PUBLIC
Creates the special `sections` datastructure used to hold parsed documentation and code.
-
dycco.dycco.should_filter
dycco.dycco.html#should_filter
Function
Function
PUBLIC
Test the given line to see if it should be included. Excludes shebang lines, for now.
-
dycco.dycco.make_output_path
dycco.dycco.html#make_output_path
Function
Function
PUBLIC
Creates an appropriate output path for the given source file and output directory. The output file name will be the name of the source file without its original extension but with `html`, `md` or `adoc` as a new one.
-
dycco.dycco.DocStringVisitor
dycco.dycco.DocStringVisitor.html
Class
Class
PUBLIC
A `NodeVisitor` subclass that walks an Abstract Syntax Tree (AST) and gathers up and notes the positions of any docstrings it finds.
-
dycco.dycco.DocStringVisitor.__init__
dycco.dycco.DocStringVisitor.html#__init__
Function
Method
PUBLIC
Undocumented
-
dycco.dycco.DocStringVisitor.docstrings
dycco.dycco.DocStringVisitor.html#docstrings
Attribute
Instance Variable
PUBLIC
Undocumented
-
dycco.dycco.DocStringVisitor.docstring_lines
dycco.dycco.DocStringVisitor.html#docstring_lines
Attribute
Instance Variable
PUBLIC
Undocumented
-
dycco.dycco.DocStringVisitor.current_node
dycco.dycco.DocStringVisitor.html#current_node
Attribute
Instance Variable
PUBLIC
Undocumented
-
dycco.dycco.DocStringVisitor.current_doc
dycco.dycco.DocStringVisitor.html#current_doc
Attribute
Instance Variable
PUBLIC
Undocumented
-
dycco.dycco.DocStringVisitor._visit_docstring_node
dycco.dycco.DocStringVisitor.html#_visit_docstring_node
Function
Method
PRIVATE
A method to be called when visiting any node that might have an associated docstring (ie, module, function and class nodes). This uses `ast.get_docstring` to grab and sanitize the docstring, and notes which node we're currently looking at.
-
dycco.dycco.DocStringVisitor.visit_Expr
dycco.dycco.DocStringVisitor.html#visit_Expr
Function
Method
PUBLIC
We need to actually visit the nodes representing the docstrings to record their positions. Docstring nodes show up as `Expr` nodes whose values are `Str` nodes.
-
dycco.cli.do_main
dycco.cli.html#do_main
Function
Function
PUBLIC
Undocumented
-
dycco.cli.main
dycco.cli.html#main
Function
Function
PUBLIC
Undocumented