Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore ListLoad Str Assign NameStore Str Assign NameStore Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Str NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num Num Str body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Assign NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad ListLoad TupleLoad NameLoad Str body If NameLoad body If NameLoad body Expr Yield TupleLoad NameLoad Call AttributeLoad Str attr NameLoad NameLoad Delete SubscriptDel NameLoad Slice Assign NameStore NameLoad If NameLoad body TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword NameLoad Expr Yield TupleLoad NameLoad NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index Num BinOpAdd SubscriptLoad NameLoad Index Num BoolOpOr AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AugAssignAdd SubscriptStore NameLoad Index Num BinOpSub Call NameLoad NameLoad Num AugAssignAdd SubscriptStore NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num orelse AugAssignAdd SubscriptStore NameLoad Index Num Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore NameStore Num Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad While Num body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Num Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpOr CompareLt NameLoad Num CompareEq NameLoad BinOpSub NameLoad Num body Break Assign NameStore SubscriptLoad NameLoad Index BinOpAdd NameLoad Num If CompareEq NameLoad Str body If CompareGt NameLoad NameLoad body Expr Yield TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore Num While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad Str NameLoad SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad NameLoad If CompareEq NameLoad Str body AugAssignAdd NameStore Num orelse If CompareEq NameLoad Str body AugAssignSub NameStore Num Expr Yield TupleLoad NameLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num BinOpSub NameLoad Num orelse If CompareIn NameLoad NameLoad body If CompareGt NameLoad NameLoad body Expr Yield TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Assign NameStore NameLoad AugAssignAdd NameStore Num While CompareLt NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareNotIn NameLoad NameLoad body Break AugAssignAdd NameStore Num Expr Yield TupleLoad NameLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num NameLoad attr orelse If BoolOpAnd UnaryOpNot NameLoad CompareEq NameLoad NameLoad body If CompareGt NameLoad NameLoad body Expr Yield TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Assign NameStore NameLoad Assign NameStore BinOpAdd NameLoad Num orelse Expr Yield TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad Num Assign NameStore BinOpAdd NameLoad Num If CompareLt NameLoad NameLoad body Expr Yield TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad decorator_list
N/A N/A String interpolation routines, i.e. the splitting up a given text into some
parts that are literal strings, and others that are Python expressions.
 itertools chain N/A os N/A re tokenize PseudoToken genshi.core TEXT genshi.template.base TemplateSyntaxError EXPR genshi.template.eval Expression N/A __all__ N/A interpolate N/A __docformat__ restructuredtext en N/A NAMESTART abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ N/A NAMECHARS N/A NAMESTART .0123456789 N/A PREFIX $ N/A token_re N/A N/A re compile N/A %s|%s(?s) N/A [uU]?[rR]?("""|\'\'\')((?<!\\)\\\1|.)*?\1 PseudoToken interpolate N/A N/A text filepath lineno offset lookup N/A None -1 0 strict N/A N/A Parse the given string and extract expressions.
    
    This function is a generator that yields `TEXT` events for literal strings,
    and `EXPR` events for expressions, depending on the results of parsing the
    string.
    
    >>> for kind, data, pos in interpolate("hey ${foo}bar"):
    ...     print('%s %r' % (kind, data))
    TEXT 'hey '
    EXPR Expression('foo')
    TEXT 'bar'
    
    :param text: the text to parse
    :param filepath: absolute path to the file in which the text was found
                     (optional)
    :param lineno: the line number at which the text was found (optional)
    :param offset: the column number at which the text starts in the source
                   (optional)
    :param lookup: the variable lookup mechanism; either "lenient" (the
                   default), "strict", or a custom lookup class
    :return: a list of `TEXT` and `EXPR` events
    :raise TemplateSyntaxError: when a syntax error in an expression is
                                encountered
     N/A pos N/A filepath lineno offset N/A textbuf N/A N/A textpos None N/A N/A is_expr chunk N/A chain N/A lex text pos filepath N/A N/A True N/A N/A is_expr N/A N/A textbuf N/A N/A N/A N/A TEXT N/A N/A join textbuf textpos N/A N/A textbuf N/A N/A textpos None N/A chunk N/A N/A N/A N/A expr N/A Expression N/A N/A chunk strip N/A pos N/A 0 N/A pos N/A 1 lookup lookup N/A N/A N/A EXPR expr N/A tuple pos N/A N/A N/A SyntaxError N/A err N/A N/A N/A TemplateSyntaxError err filepath N/A pos N/A 1 N/A N/A pos N/A 2 N/A N/A err offset 0 N/A N/A N/A N/A textbuf append chunk N/A N/A textpos None N/A N/A textpos N/A tuple pos N/A N/A chunk N/A N/A lines N/A N/A chunk splitlines N/A N/A pos N/A 1 N/A N/A len lines 1 N/A N/A pos N/A 2 N/A len N/A lines N/A -1 N/A N/A N/A pos N/A 2 N/A len chunk N/A lex N/A N/A text textpos filepath N/A N/A N/A offset pos 0 N/A end N/A len text N/A escaped False N/A 1 N/A N/A escaped N/A N/A offset N/A N/A text find PREFIX N/A offset 2 N/A escaped False N/A N/A offset N/A N/A text find PREFIX pos N/A N/A N/A offset 0 N/A offset N/A end 1 N/A N/A N/A next N/A text N/A N/A offset 1 N/A N/A next { N/A N/A N/A offset pos N/A N/A N/A N/A False N/A text N/A pos offset N/A pos N/A offset 2 N/A level 1 N/A level N/A N/A match N/A N/A token_re match text pos N/A N/A N/A match None N/A N/A N/A match group N/A N/A N/A TemplateSyntaxError invalid syntax filepath N/A textpos N/A 1 N/A pos N/A N/A match end N/A N/A tstart tend N/A N/A match regs N/A 3 N/A token N/A text N/A tstart tend N/A N/A token { N/A N/A level 1 N/A N/A N/A token } N/A N/A level 1 N/A N/A N/A True N/A text N/A N/A offset 2 N/A pos 1 N/A N/A N/A next NAMESTART N/A N/A N/A offset pos N/A N/A N/A N/A False N/A text N/A pos offset N/A pos offset N/A pos 1 N/A N/A pos end N/A N/A char N/A text N/A pos N/A N/A char NAMECHARS N/A N/A N/A pos 1 N/A N/A N/A True N/A N/A N/A text N/A N/A offset 1 pos strip N/A N/A N/A N/A escaped N/A next PREFIX N/A N/A N/A offset pos N/A N/A N/A N/A False N/A text N/A pos offset N/A escaped True N/A pos N/A offset 1 N/A N/A N/A N/A False N/A text N/A pos N/A offset 1 N/A pos N/A offset 1 N/A N/A pos end N/A N/A N/A N/A False N/A text N/A pos N/A