crt1d.utils
#
Some utility functions, mostly for internal use.
Module Contents#
Functions#
|
Decorator that dedents docstrings with inspect.getdoc and adds |
Convert CF-style units string to TeX-like. |
- crt1d.utils.add_snippets(func, snippets)#
Decorator that dedents docstrings with inspect.getdoc and adds un-indented snippets from the global snippets dictionary. This function uses
%(name)s
substitution rather than str.format substitution so that the snippets keys can be invalid variable names.