syntaxhighlighter / src / python32.py

syntax =  {'formats': {'builtin': '%(syntax_builtin)s',
             'comment': '%(syntax_comment)s',
             'keyword': '%(syntax_keyword)s',
             'number': '%(syntax_number)s',
             'string': '%(syntax_string)s'},
 'partitions': [('comment', '#', '\n'),
                ('string', "'''", "'''", True),
                ('string', "'", "'"),
                ('string', '"""', '"""', True),
                ('string', '"', '"')],
 'scanner': {None: [('number', '(0x)?\\d+(\\.\\d*)?'),
                    ('keyword',
                     ['False',
                      'None',
                      'True',
                      'and',
                      'as',
                      'assert',
                      'break',
                      'class',
                      'continue',
                      'def',
                      'del',
                      'elif',
                      'else',
                      'except',
                      'finally',
                      'for',
                      'from',
                      'global',
                      'if',
                      'import',
                      'in',
                      'is',
                      'lambda',
                      'nonlocal',
                      'not',
                      'or',
                      'pass',
                      'raise',
                      'return',
                      'try',
                      'while',
                      'with',
                      'yield'],
                     '(^|[\x08\\W])',
                     '[\x08\\W]'),
                    ('builtin',
                     ['ArithmeticError',
                      'AssertionError',
                      'AttributeError',
                      'BaseException',
                      'BufferError',
                      'BytesWarning',
                      'DeprecationWarning',
                      'EOFError',
                      'Ellipsis',
                      'EnvironmentError',
                      'Exception',
                      'False',
                      'FloatingPointError',
                      'FutureWarning',
                      'GeneratorExit',
                      'IOError',
                      'ImportError',
                      'ImportWarning',
                      'IndentationError',
                      'IndexError',
                      'KeyError',
                      'KeyboardInterrupt',
                      'LookupError',
                      'MemoryError',
                      'NameError',
                      'None',
                      'NotImplemented',
                      'NotImplementedError',
                      'OSError',
                      'OverflowError',
                      'PendingDeprecationWarning',
                      'ReferenceError',
                      'ResourceWarning',
                      'RuntimeError',
                      'RuntimeWarning',
                      'StopIteration',
                      'SyntaxError',
                      'SyntaxWarning',
                      'SystemError',
                      'SystemExit',
                      'TabError',
                      'True',
                      'TypeError',
                      'UnboundLocalError',
                      'UnicodeDecodeError',
                      'UnicodeEncodeError',
                      'UnicodeError',
                      'UnicodeTranslateError',
                      'UnicodeWarning',
                      'UserWarning',
                      'ValueError',
                      'Warning',
                      'ZeroDivisionError',
                      '__import__',
                      'abs',
                      'all',
                      'any',
                      'ascii',
                      'bin',
                      'bool',
                      'bytearray',
                      'bytes',
                      'callable',
                      'chr',
                      'classmethod',
                      'compile',
                      'complex',
                      'copyright',
                      'credits',
                      'delattr',
                      'dict',
                      'dir',
                      'divmod',
                      'enumerate',
                      'eval',
                      'exec',
                      'exit',
                      'filter',
                      'float',
                      'format',
                      'frozenset',
                      'getattr',
                      'globals',
                      'hasattr',
                      'hash',
                      'help',
                      'hex',
                      'id',
                      'input',
                      'int',
                      'isinstance',
                      'issubclass',
                      'iter',
                      'len',
                      'license',
                      'list',
                      'locals',
                      'map',
                      'max',
                      'memoryview',
                      'min',
                      'next',
                      'object',
                      'oct',
                      'open',
                      'ord',
                      'pow',
                      'print',
                      'property',
                      'quit',
                      'range',
                      'repr',
                      'reversed',
                      'round',
                      'set',
                      'setattr',
                      'slice',
                      'sorted',
                      'staticmethod',
                      'str',
                      'sum',
                      'super',
                      'tuple',
                      'type',
                      'vars',
                      'zip'],
                     '([^\\.]|^)',
                     '[\x08\\W]'),
                    ('ident', '[A-Za-z_][A-Za-z_0-9]*')]}}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.