Module Expr Str Import alias Import alias ClassDef bases NameLoad body Assign NameStore NameLoad Assign NameStore TupleLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num AttributeLoad NameLoad attr BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Dict kwarg body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore IfExp CompareIn NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Dict kwarg body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore TupleLoad Str Str decorator_list
N/A N/A 
Network template
 N/A re N/A six BaseTemplate N/A object N/A N/A idpattern None N/A braces N/A None None __init__ N/A N/A self template N/A N/A N/A N/A self template template N/A N/A self pattern N/A N/A re compile N/A N/A {0}\s*(?P<id>{2})\s*{1} format N/A N/A self braces N/A 0 N/A N/A self braces N/A 1 N/A self idpattern N/A N/A re IGNORECASE N/A re VERBOSE N/A substitute N/A N/A self data N/A N/A kwargs N/A convert N/A N/A mo N/A N/A N/A key N/A N/A mo group id N/A val N/A N/A key kwargs N/A kwargs N/A key N/A data N/A key N/A N/A N/A six text_type val N/A N/A N/A N/A N/A self pattern sub convert N/A self template N/A safe_substitute N/A N/A self data N/A N/A kwargs N/A convert N/A N/A mo N/A N/A N/A key N/A N/A mo group id N/A N/A key kwargs N/A N/A val N/A kwargs N/A key N/A N/A N/A key data N/A N/A val N/A data N/A key N/A N/A val N/A N/A mo group N/A N/A N/A six text_type val N/A N/A N/A N/A N/A self pattern sub convert N/A self template N/A N/A NetworkTemplate N/A BaseTemplate N/A N/A NetworkTemplate object provides string substitution

    NetworkTemplate substitutes <% key %> to value
    for key=value
    Spaces inside <%...%> block are ignored

    Example:
    template = NetworkTemplate("a: <%a%> b: <% b %>")
    template.safe_substitute(a='aaa', b='bbb')
    -> "a: aaa b: bbb"
     N/A idpattern [_a-z][_a-z0-9]* N/A braces N/A <% %> N/A