Module Expr Str Import alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareNotIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Return NameLoad orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad orelse If CompareIn Call AttributeLoad NameLoad attr TupleLoad Str Str Str Str body Return NameLoad orelse If CompareIn Call AttributeLoad NameLoad attr TupleLoad Str Str Str Str body Return NameLoad orelse Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad TryExcept body Return Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Return Call NameLoad NameLoad orelse Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Return Str Assign NameStore ListLoad For NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr body If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call AttributeLoad NameLoad attr orelse Break Return Call AttributeLoad Call AttributeLoad Str attr NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Return Num Return Call NameLoad Num Call NameLoad Num Call NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareGtE NameLoad Num body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr Str body TryExcept body Assign NameStore SubscriptLoad ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Slice Num attr BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str Index Num handlers ExceptHandler type NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad AttributeLoad NameLoad attr If CompareIsNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Return CompareIsNot Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad Str decorator_list Assign NameStore Dict FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad TryExcept body Return SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad Assign NameStore CompareIsNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
    pygments.util
    ~~~~~~~~~~~~~

    Utility functions.

    :copyright: 2006-2008 by Georg Brandl.
    :license: BSD, see LICENSE for more details.
 N/A re N/A split_path_re N/A N/A re compile [/\\ ] N/A doctype_lookup_re N/A N/A re compile (?smx)
    (<\?.*?\?>)?\s*
    <!DOCTYPE\s+(
     [a-zA-Z_][a-zA-Z0-9]*\s+
     [a-zA-Z_][a-zA-Z0-9]*\s+
     "[^"]*")
     [^>]*>
 N/A tag_re N/A N/A re compile <(.+?)(\s.*?)?>.*?</.+?>(?uism) ClassNotFound N/A ValueError N/A N/A 
    If one of the get_*_by_* functions didn't find a matching class.
     N/A OptionError N/A Exception N/A N/A N/A get_choice_opt N/A N/A options optname allowed default normcase N/A None False N/A N/A string N/A N/A options get optname default N/A normcase N/A N/A string N/A N/A string lower N/A N/A string allowed N/A N/A N/A OptionError N/A Value for option %s must be one of %s N/A optname N/A N/A ,  join N/A map str allowed N/A string N/A get_bool_opt N/A N/A options optname default N/A None N/A N/A string N/A N/A options get optname default N/A N/A isinstance string bool N/A N/A string N/A N/A N/A isinstance string int N/A N/A N/A bool string N/A N/A N/A N/A isinstance string basestring N/A N/A N/A OptionError N/A Invalid type %r for option %s; use 1/0, yes/no, true/false, on/off N/A string optname N/A N/A N/A N/A N/A string lower N/A 1 yes true on N/A N/A True N/A N/A N/A N/A N/A string lower N/A 0 no false off N/A N/A False N/A N/A N/A OptionError N/A Invalid value %r for option %s; use 1/0, yes/no, true/false, on/off N/A string optname N/A get_int_opt N/A N/A options optname default N/A None N/A N/A string N/A N/A options get optname default N/A N/A N/A N/A int string N/A N/A N/A TypeError N/A N/A N/A OptionError N/A Invalid type %r for option %s; you must give an integer value N/A string optname N/A N/A ValueError N/A N/A N/A OptionError N/A Invalid value %r for option %s; you must give an integer value N/A string optname N/A get_list_opt N/A N/A options optname default N/A None N/A N/A val N/A N/A options get optname default N/A N/A isinstance val basestring N/A N/A N/A N/A val split N/A N/A N/A isinstance val N/A list tuple N/A N/A N/A list val N/A N/A N/A OptionError N/A Invalid type %r for option %s; you must give a list value N/A val optname N/A docstring_headline N/A N/A obj N/A N/A N/A N/A N/A obj __doc__ N/A N/A N/A res N/A N/A line N/A N/A N/A N/A N/A obj __doc__ strip splitlines N/A N/A N/A N/A line strip N/A N/A N/A N/A res append N/A N/A N/A line strip N/A N/A N/A N/A N/A N/A N/A join res lstrip N/A make_analysator N/A N/A f N/A N/A N/A 
    Return a static text analysation function that
    returns float values.
     text_analyse N/A N/A text N/A N/A N/A rv N/A f text N/A N/A rv N/A N/A 0.0 N/A N/A min 1.0 N/A max 0.0 N/A float rv N/A N/A N/A text_analyse __doc__ N/A f __doc__ N/A N/A staticmethod text_analyse N/A shebang_matches N/A N/A text regex N/A N/A N/A 
    Check if the given regular expression matches the last part of the
    shebang if one exists.

        >>> from pygments.util import shebang_matches
        >>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/startsomethingwith python',
        ...                 r'python(2\.\d)?')
        True

    It also checks for common windows executable file extensions::

        >>> shebang_matches('#!C:\Python2.4\Python.exe', r'python(2\.\d)?')
        True

    Parameters (``'-f'`` or ``'--foo'`` are ignored so ``'perl'`` does
    the same as ``'perl -e'``)

    Note that this method automatically searches the whole string (eg:
    the regular expression is wrapped in ``'^$'``)
     N/A index N/A N/A text find N/A N/A index 0 N/A N/A first_line N/A N/A N/A text N/A index lower N/A N/A first_line N/A N/A text lower N/A N/A N/A first_line startswith #! N/A N/A N/A N/A found N/A N/A x N/A x N/A N/A split_path_re split N/A N/A N/A first_line N/A 2 strip N/A x N/A N/A N/A x startswith - N/A -1 N/A N/A N/A IndexError N/A N/A False N/A regex N/A N/A re compile N/A ^%s(\.(exe|cmd|bat|bin))?$ regex N/A re IGNORECASE N/A N/A N/A N/A regex search found None N/A N/A True N/A False N/A doctype_matches N/A N/A text regex N/A N/A N/A 
    Check if the doctype matches a regular expression (if present).
    Note that this method only checks the first part of a DOCTYPE.
    eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
     N/A m N/A N/A doctype_lookup_re match text N/A N/A m None N/A N/A False N/A doctype N/A N/A m group 2 N/A N/A N/A N/A N/A N/A re compile regex match N/A N/A doctype strip None N/A html_doctype_matches N/A N/A text N/A N/A N/A 
    Check if the file looks like it has a html doctype.
     N/A N/A doctype_matches text html\s+PUBLIC\s+"-//W3C//DTD X?HTML.* N/A N/A _looks_like_xml_cache N/A looks_like_xml N/A N/A text N/A N/A N/A 
    Check if a doctype exists or if we have some tags.
     N/A key N/A hash text N/A N/A N/A N/A _looks_like_xml_cache N/A key N/A N/A N/A KeyError N/A N/A m N/A N/A doctype_lookup_re match text N/A N/A m None N/A N/A True N/A rv N/A N/A N/A tag_re search N/A text N/A 1000 None N/A N/A _looks_like_xml_cache N/A key rv N/A rv N/A