complexity Package¶
conf Module¶
exceptions Module¶
complexity.exceptions¶
All exceptions used in the Complexity code base are defined here.
-
exception
complexity.exceptions.ComplexityException[source]¶ Bases:
ExceptionBase exception class. All Complexity-specific exceptions subclass ComplexityException.
-
exception
complexity.exceptions.MissingTemplateDirException[source]¶ Bases:
complexity.exceptions.ComplexityExceptionRaised when a project is missing a templates/ subdirectory.
-
exception
complexity.exceptions.NonHTMLFileException[source]¶ Bases:
complexity.exceptions.ComplexityExceptionRaised when a project’s templates/ directory contains a non-HTML file.
-
exception
complexity.exceptions.OutputDirExistsException[source]¶ Bases:
complexity.exceptions.ComplexityExceptionRaised when a project’s output_dir exists and no_input=True.
generate Module¶
main Module¶
prep Module¶
complexity.prep¶
Functions for preparing a Complexity project for static site generation, before it actually happens.
serve Module¶
utils Module¶
complexity.utils¶
Helper functions used throughout Complexity.
-
complexity.utils.make_sure_path_exists(path)[source]¶ Ensures that a directory exists.
Parameters: path – A directory path.
-
complexity.utils.query_yes_no(question, default='yes')[source]¶ Ask a yes/no question via raw_input() and return their answer.
Parameters: - question – A string that is presented to the user.
- default – The presumed answer if the user just hits <Enter>. It must be “yes” (the default), “no” or None (meaning an answer is required of the user).
The “answer” return value is one of “yes” or “no”.
Adapted from http://stackoverflow.com/questions/3041986/python-command-line-yes-no-input http://code.activestate.com/recipes/577058/