|
def | __init__ (self, start_var_token="${", end_var_token="}", start_rep_token="${{", end_rep_token="}}", trim_leading_lf=True, checkmissing=True) |
|
def | find_end (self, text, start_token, end_token, ignore_end_token=None) |
|
def | find_rep_end (self, text) |
|
def | find_var_end (self, text) |
|
def | substitute (self, text, subvars={}, trim_leading_lf=None, checkmissing=None) |
|
def | write (self, file, text, subvars={}, trim_leading_lf=True) |
|
simple templating system
Definition at line 13 of file mavtemplate.py.
def pymavlink.generator.mavtemplate.MAVTemplate.__init__ |
( |
|
self, |
|
|
|
start_var_token = "${" , |
|
|
|
end_var_token = "}" , |
|
|
|
start_rep_token = "${{" , |
|
|
|
end_rep_token = "}}" , |
|
|
|
trim_leading_lf = True , |
|
|
|
checkmissing = True |
|
) |
| |
def pymavlink.generator.mavtemplate.MAVTemplate.find_end |
( |
|
self, |
|
|
|
text, |
|
|
|
start_token, |
|
|
|
end_token, |
|
|
|
ignore_end_token = None |
|
) |
| |
find the of a token.
Returns the offset in the string immediately after the matching end_token
Definition at line 29 of file mavtemplate.py.
def pymavlink.generator.mavtemplate.MAVTemplate.find_rep_end |
( |
|
self, |
|
|
|
text |
|
) |
| |
def pymavlink.generator.mavtemplate.MAVTemplate.find_var_end |
( |
|
self, |
|
|
|
text |
|
) |
| |
def pymavlink.generator.mavtemplate.MAVTemplate.substitute |
( |
|
self, |
|
|
|
text, |
|
|
|
subvars = {} , |
|
|
|
trim_leading_lf = None , |
|
|
|
checkmissing = None |
|
) |
| |
def pymavlink.generator.mavtemplate.MAVTemplate.write |
( |
|
self, |
|
|
|
file, |
|
|
|
text, |
|
|
|
subvars = {} , |
|
|
|
trim_leading_lf = True |
|
) |
| |
write to a file with variable substitution
Definition at line 131 of file mavtemplate.py.
pymavlink.generator.mavtemplate.MAVTemplate.checkmissing |
pymavlink.generator.mavtemplate.MAVTemplate.end_rep_token |
pymavlink.generator.mavtemplate.MAVTemplate.end_var_token |
pymavlink.generator.mavtemplate.MAVTemplate.start_rep_token |
pymavlink.generator.mavtemplate.MAVTemplate.start_var_token |
pymavlink.generator.mavtemplate.MAVTemplate.trim_leading_lf |
The documentation for this class was generated from the following file: