Classes | Functions | Variables
libuavcan_dsdl_compiler.pyratemp Namespace Reference

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
 

Function Documentation

◆ _doctest()

def libuavcan_dsdl_compiler.pyratemp._doctest ( )
private
doctest this module.

Definition at line 1215 of file pyratemp.py.

◆ dictkeyclean()

def libuavcan_dsdl_compiler.pyratemp.dictkeyclean (   d)
Convert all keys of the dict `d` to strings.

Definition at line 242 of file pyratemp.py.

◆ dummy()

def libuavcan_dsdl_compiler.pyratemp.dummy ( _,
**  __ 
)
Dummy function, doing nothing.

Definition at line 252 of file pyratemp.py.

◆ dummy_raise()

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.

◆ escape()

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.

◆ scol()

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.

◆ sindex()

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.

◆ srow()

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.

Variable Documentation

◆ __author__

string libuavcan_dsdl_compiler.pyratemp.__author__ = "Roland Koebler <rk at simple-is-better dot org>"
private

Definition at line 172 of file pyratemp.py.

◆ __license__

string libuavcan_dsdl_compiler.pyratemp.__license__
private
Initial value:
1 = """Copyright (c) Roland Koebler, 2007-2013
2 
3 Permission is hereby granted, free of charge, to any person obtaining a copy
4 of this software and associated documentation files (the "Software"), to deal
5 in the Software without restriction, including without limitation the rights
6 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 copies of the Software, and to permit persons to whom the Software is
8 furnished to do so, subject to the following conditions:
9 
10 The above copyright notice and this permission notice shall be included in
11 all copies or substantial portions of the Software.
12 
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 IN THE SOFTWARE."""

Definition at line 173 of file pyratemp.py.

◆ __version__

string libuavcan_dsdl_compiler.pyratemp.__version__ = "0.3.0"
private

Definition at line 171 of file pyratemp.py.

◆ ESCAPE_SUPPORTED

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.

◆ long

libuavcan_dsdl_compiler.pyratemp.long = int

Definition at line 199 of file pyratemp.py.

◆ unicode

libuavcan_dsdl_compiler.pyratemp.unicode = str

Definition at line 198 of file pyratemp.py.



uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:04