Classes | |
class | _dontescape |
class | EvalPseudoSandbox |
class | LoaderFile |
class | LoaderString |
class | Parser |
class | Renderer |
class | Template |
class | TemplateBase |
class | TemplateException |
class | TemplateIncludeError |
class | TemplateParseError |
class | TemplateRenderError |
class | TemplateSyntaxError |
Functions | |
def | _doctest () |
def | dictkeyclean (d) |
def | dummy (*_, **__) |
def | dummy_raise (exception, value) |
def | escape (s, format=HTML) |
def | scol (string, i) |
def | sindex (string, row, col) |
def | srow (string, i) |
Variables | |
string | __author__ = "Roland Koebler <rk at simple-is-better dot org>" |
string | __license__ |
string | __version__ = "0.3.0" |
dictionary | ESCAPE_SUPPORTED = {"NONE":None, "HTML":HTML, "LATEX":LATEX, "MAIL_HEADER":MAIL_HEADER} |
long = int | |
unicode = str | |
|
private |
doctest this module.
Definition at line 1215 of file pyratemp.py.
def libuavcan_dsdl_compiler.pyratemp.dictkeyclean | ( | d | ) |
Convert all keys of the dict `d` to strings.
Definition at line 242 of file pyratemp.py.
def libuavcan_dsdl_compiler.pyratemp.dummy | ( | * | _, |
** | __ | ||
) |
Dummy function, doing nothing.
Definition at line 252 of file pyratemp.py.
def libuavcan_dsdl_compiler.pyratemp.dummy_raise | ( | exception, | |
value | |||
) |
Create an exception-raising dummy function. :Returns: dummy function, raising ``exception(value)``
Definition at line 257 of file pyratemp.py.
def libuavcan_dsdl_compiler.pyratemp.escape | ( | s, | |
format = HTML |
|||
) |
Replace special characters by their escape sequence. :Parameters: - `s`: unicode-string to escape - `format`: - `NONE`: nothing is replaced - `HTML`: replace &<>'" by &...; - `LATEX`: replace \#$%&_{}~^ - `MAIL_HEADER`: escape non-ASCII mail-header-contents :Returns: the escaped string in unicode :Exceptions: - `ValueError`: if `format` is invalid. :Uses: MAIL_HEADER uses module email
Definition at line 272 of file pyratemp.py.
def libuavcan_dsdl_compiler.pyratemp.scol | ( | string, | |
i | |||
) |
Get column number of ``string[i]`` in `string`. :Returns: column, starting at 1 (but may be <1 if i<0) :Note: This works for text-strings with ``\\n`` or ``\\r\\n``.
Definition at line 218 of file pyratemp.py.
def libuavcan_dsdl_compiler.pyratemp.sindex | ( | string, | |
row, | |||
col | |||
) |
Get index of the character at `row`/`col` in `string`. :Parameters: - `row`: row number, starting at 1. - `col`: column number, starting at 1. :Returns: ``i``, starting at 0 (but may be <1 if row/col<0) :Note: This works for text-strings with '\\n' or '\\r\\n'.
Definition at line 226 of file pyratemp.py.
def libuavcan_dsdl_compiler.pyratemp.srow | ( | string, | |
i | |||
) |
Get line numer of ``string[i]`` in `string`. :Returns: row, starting at 1 :Note: This works for text-strings with ``\\n`` or ``\\r\\n``.
Definition at line 210 of file pyratemp.py.
|
private |
Definition at line 172 of file pyratemp.py.
|
private |
Definition at line 173 of file pyratemp.py.
|
private |
Definition at line 171 of file pyratemp.py.
dictionary libuavcan_dsdl_compiler.pyratemp.ESCAPE_SUPPORTED = {"NONE":None, "HTML":HTML, "LATEX":LATEX, "MAIL_HEADER":MAIL_HEADER} |
Definition at line 270 of file pyratemp.py.
libuavcan_dsdl_compiler.pyratemp.long = int |
Definition at line 199 of file pyratemp.py.
libuavcan_dsdl_compiler.pyratemp.unicode = str |
Definition at line 198 of file pyratemp.py.