Rev 1 |
|
Rev 3 |
Line 2... |
|
Line 2... |
/************************************************************************************* |
|
/************************************************************************************* |
* python.php |
|
* python.php |
* ---------- |
|
* ---------- |
* Author: Roberto Rossi (rsoftware@altervista.org) |
|
* Author: Roberto Rossi (rsoftware@altervista.org) |
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) |
|
* Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) |
* Release Version: 1.0.8.1 |
|
* Release Version: 1.0.8.3 |
* Date Started: 2004/08/30 |
|
* Date Started: 2004/08/30 |
* |
|
* |
* Python language file for GeSHi. |
|
* Python language file for GeSHi. |
* |
|
* |
* CHANGES |
|
* CHANGES |
* ------- |
|
* ------- |
|
|
* 2008/12/18 |
|
|
* - Added missing functions and keywords. Also added two new Python 3.0 types. SF#2441839 |
* 2005/05/26 |
|
* 2005/05/26 |
* - Modifications by Tim (tim@skreak.com): added more keyword categories, tweaked colors |
|
* - Modifications by Tim (tim@skreak.com): added more keyword categories, tweaked colors |
* 2004/11/27 (1.0.1) |
|
* 2004/11/27 (1.0.1) |
* - Added support for multiple object splitters |
|
* - Added support for multiple object splitters |
* 2004/08/30 (1.0.0) |
|
* 2004/08/30 (1.0.0) |
Line 56... |
|
Line 58... |
** http://python.org/doc/current/ref/keywords.html |
|
** http://python.org/doc/current/ref/keywords.html |
*/ |
|
*/ |
1 => array( |
|
1 => array( |
'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', |
|
'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', |
'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', |
|
'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', |
'import', 'pass', 'yield', 'def', 'finally', 'in', 'print' |
|
'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as' |
), |
|
), |
|
|
|
/* |
|
/* |
** Set 2: builtins |
|
** Set 2: builtins |
** http://python.org/doc/current/lib/built-in-funcs.html |
|
** http://python.org/doc/current/lib/built-in-funcs.html |
Line 85... |
|
Line 87... |
'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', |
|
'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', |
'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', |
|
'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', |
'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', |
|
'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', |
'RuntimeWarning', 'FutureWarning', |
|
'RuntimeWarning', 'FutureWarning', |
// self: this is a common python convention (but not a reserved word) |
|
// self: this is a common python convention (but not a reserved word) |
'self' |
|
'self', |
|
|
// other |
|
|
'any', 'all' |
), |
|
), |
|
|
|
/* |
|
/* |
** Set 3: standard library |
|
** Set 3: standard library |
** http://python.org/doc/current/lib/modindex.html |
|
** http://python.org/doc/current/lib/modindex.html |
Line 122... |
|
Line 126... |
'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', |
|
'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', |
'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', |
|
'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', |
'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', |
|
'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', |
'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', |
|
'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', |
'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', |
|
'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', |
'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib' |
|
'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib', |
|
|
// Python 3.0 |
|
|
'bytes', 'bytearray' |
), |
|
), |
|
|
|
/* |
|
/* |
** Set 4: special methods |
|
** Set 4: special methods |
** http://python.org/doc/current/ref/specialnames.html |
|
** http://python.org/doc/current/ref/specialnames.html |