• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

syntax_highlight/php/HFile/HFile_python.php

Go to the documentation of this file.
00001 <?php
00002 
00003 $BEAUT_PATH = realpath(".")."/syntax_highlight/php";
00004 if (!isset ($BEAUT_PATH)) return;
00005 require_once("$BEAUT_PATH/Beautifier/HFile.php");
00006   class HFile_python extends HFile{
00007    function HFile_python(){
00008      $this->HFile();
00009      
00010 /*************************************/
00011 // Beautifier Highlighting Configuration File 
00012 // Python
00013 /*************************************/
00014 // Flags
00015 
00016 $this->nocase                   = "0";
00017 $this->notrim                   = "1";
00018 $this->perl                     = "0";
00019 
00020 // Colours
00021 
00022 $this->colours          = array("blue", "purple", "gray", "brown", "blue", "purple", "gray");
00023 $this->quotecolour              = "blue";
00024 $this->blockcommentcolour       = "green";
00025 $this->linecommentcolour        = "green";
00026 
00027 // Indent Strings
00028 
00029 $this->indent                   = array();
00030 $this->unindent                 = array();
00031 
00032 // String characters and delimiters
00033 
00034 $this->stringchars              = array();
00035 $this->delimiters               = array("[", "]", "{", "}", "(", ")", "<", ">", "=", "\"", "'", ".", ",", ":", "+", " ", "      ");
00036 $this->escchar                  = "";
00037 
00038 // Comment settings
00039 
00040 $this->linecommenton            = array("#");
00041 $this->blockcommenton           = array("");
00042 $this->blockcommentoff          = array("");
00043 
00044 // Keywords (keyword mapping to colour number)
00045 
00046 $this->keywords                 = array(
00047                         "and" => "1", 
00048                         "assert" => "1", 
00049                         "break" => "1", 
00050                         "class" => "1", 
00051                         "continue" => "1", 
00052                         "def" => "1", 
00053                         "del" => "1", 
00054                         "elif" => "1", 
00055                         "else" => "1", 
00056                         "except" => "1", 
00057                         "exec" => "1", 
00058                         "finally" => "1", 
00059                         "for" => "1", 
00060                         "from" => "1", 
00061                         "global" => "1", 
00062                         "if" => "1", 
00063                         "import" => "1", 
00064                         "in" => "1", 
00065                         "is" => "1", 
00066                         "lambda" => "1", 
00067                         "map" => "1", 
00068                         "not" => "1", 
00069                         "None" => "1", 
00070                         "or" => "1", 
00071                         "pass" => "1", 
00072                         "print" => "1", 
00073                         "raise" => "1", 
00074                         "range" => "1", 
00075                         "return" => "1", 
00076                         "try" => "1", 
00077                         "while" => "1", 
00078                         "abs" => "2", 
00079                         "apply" => "2", 
00080                         "callable" => "2", 
00081                         "chr" => "2", 
00082                         "cmp" => "2", 
00083                         "coerce" => "2", 
00084                         "compile" => "2", 
00085                         "complex" => "2", 
00086                         "delattr" => "2", 
00087                         "dir" => "2", 
00088                         "divmod" => "2", 
00089                         "eval" => "2", 
00090                         "execfile" => "2", 
00091                         "filter" => "2", 
00092                         "float" => "2", 
00093                         "getattr" => "2", 
00094                         "globals" => "2", 
00095                         "group" => "2", 
00096                         "hasattr" => "2", 
00097                         "hash" => "2", 
00098                         "hex" => "2", 
00099                         "id" => "2", 
00100                         "input" => "2", 
00101                         "int" => "2", 
00102                         "intern" => "2", 
00103                         "isinstance" => "2", 
00104                         "issubclass" => "2", 
00105                         "joinfields" => "2", 
00106                         "len" => "2", 
00107                         "list" => "2", 
00108                         "local" => "2", 
00109                         "long" => "2", 
00110                         "max" => "2", 
00111                         "min" => "2", 
00112                         "match" => "2", 
00113                         "oct" => "2", 
00114                         "open" => "2", 
00115                         "ord" => "2", 
00116                         "pow" => "2", 
00117                         "raw_input" => "2", 
00118                         "reduce" => "2", 
00119                         "reload" => "2", 
00120                         "repr" => "2", 
00121                         "round" => "2", 
00122                         "search" => "2", 
00123                         "setattr" => "2", 
00124                         "slice" => "2", 
00125                         "str" => "2", 
00126                         "splitfields" => "2", 
00127                         "tuple" => "2", 
00128                         "type" => "2", 
00129                         "vars" => "2", 
00130                         "xrange" => "2", 
00131                         "__import__" => "2", 
00132                         "__abs__" => "3", 
00133                         "__add__" => "3", 
00134                         "__and__" => "3", 
00135                         "__call__" => "3", 
00136                         "__cmp__" => "3", 
00137                         "__coerce__" => "3", 
00138                         "__del__" => "3", 
00139                         "__delattr__" => "3", 
00140                         "__delitem__" => "3", 
00141                         "__delslice__" => "3", 
00142                         "__div__" => "3", 
00143                         "__divmod__" => "3", 
00144                         "__float__" => "3", 
00145                         "__getattr__" => "3", 
00146                         "__getitem__" => "3", 
00147                         "__getslice__" => "3", 
00148                         "__hash__" => "3", 
00149                         "__hex__" => "3", 
00150                         "__invert__" => "3", 
00151                         "__int__" => "3", 
00152                         "__init__" => "3", 
00153                         "__len__" => "3", 
00154                         "__long__" => "3", 
00155                         "__lshift__" => "3", 
00156                         "__mod__" => "3", 
00157                         "__mul__" => "3", 
00158                         "__neg__" => "3", 
00159                         "__nonzero__" => "3", 
00160                         "__oct__" => "3", 
00161                         "__or__" => "3", 
00162                         "__pos__" => "3", 
00163                         "__pow__" => "3", 
00164                         "__radd__" => "3", 
00165                         "__rdiv__" => "3", 
00166                         "__rdivmod__" => "3", 
00167                         "__rmod__" => "3", 
00168                         "__rpow__" => "3", 
00169                         "__rlshift__" => "3", 
00170                         "__rrshift__" => "3", 
00171                         "__rshift__" => "3", 
00172                         "__rsub__" => "3", 
00173                         "__rmul__" => "3", 
00174                         "__repr__" => "3", 
00175                         "__rand__" => "3", 
00176                         "__rxor__" => "3", 
00177                         "__ror__" => "3", 
00178                         "__setattr__" => "3", 
00179                         "__setitem__" => "3", 
00180                         "__setslice__" => "3", 
00181                         "__str__" => "3", 
00182                         "__sub__" => "3", 
00183                         "__xor__" => "3", 
00184                         "__bases__" => "4", 
00185                         "__class__" => "4", 
00186                         "__dict__" => "4", 
00187                         "__methods__" => "4", 
00188                         "__members__" => "4", 
00189                         "__name__" => "4", 
00190                         "__version__" => "4", 
00191                         "ArithmeticError" => "5", 
00192                         "AssertionError" => "5", 
00193                         "AttributeError" => "5", 
00194                         "EOFError" => "5", 
00195                         "Exception" => "5", 
00196                         "FloatingPointError" => "5", 
00197                         "IOError" => "5", 
00198                         "ImportError" => "5", 
00199                         "IndexError" => "5", 
00200                         "KeyError" => "5", 
00201                         "KeyboardInterrupt" => "5", 
00202                         "LookupError" => "5", 
00203                         "MemoryError" => "5", 
00204                         "NameError" => "5", 
00205                         "OverflowError" => "5", 
00206                         "RuntimeError" => "5", 
00207                         "StandardError" => "5", 
00208                         "SyntaxError" => "5", 
00209                         "SystemError" => "5", 
00210                         "SystemExit" => "5", 
00211                         "TypeError" => "5", 
00212                         "ValueError" => "5", 
00213                         "ZeroDivisionError" => "5", 
00214                         "AST" => "6", 
00215                         "BaseHTTPServer" => "6", 
00216                         "Bastion" => "6", 
00217                         "cmd" => "6", 
00218                         "commands" => "6", 
00219                         "compileall" => "6", 
00220                         "copy" => "6", 
00221                         "CGIHTTPServer" => "6", 
00222                         "Complex" => "6", 
00223                         "dbhash" => "6", 
00224                         "dircmp" => "6", 
00225                         "dis" => "6", 
00226                         "dospath" => "6", 
00227                         "dumbdbm" => "6", 
00228                         "emacs" => "6", 
00229                         "find" => "6", 
00230                         "fmt" => "6", 
00231                         "fnmatch" => "7", 
00232                         "ftplib" => "6", 
00233                         "getopt" => "6", 
00234                         "glob" => "6", 
00235                         "gopherlib" => "6", 
00236                         "grep" => "6", 
00237                         "htmllib" => "6", 
00238                         "httplib" => "6", 
00239                         "ihooks" => "6", 
00240                         "imghdr" => "6", 
00241                         "linecache" => "6", 
00242                         "lockfile" => "6", 
00243                         "macpath" => "6", 
00244                         "macurl2path" => "6", 
00245                         "mailbox" => "6", 
00246                         "mailcap" => "6", 
00247                         "mimetools" => "6", 
00248                         "mimify" => "6", 
00249                         "mutex" => "6", 
00250                         "math" => "6", 
00251                         "Mimewriter" => "6", 
00252                         "newdir" => "6", 
00253                         "ni" => "6", 
00254                         "nntplib" => "6", 
00255                         "ntpath" => "6", 
00256                         "nturl2path" => "6", 
00257                         "os" => "6", 
00258                         "ospath" => "6", 
00259                         "pdb" => "6", 
00260                         "pickle" => "6", 
00261                         "pipes" => "6", 
00262                         "poly" => "6", 
00263                         "popen2" => "6", 
00264                         "posixfile" => "6", 
00265                         "posixpath" => "6", 
00266                         "profile" => "6", 
00267                         "pstats" => "6", 
00268                         "pyclbr" => "6", 
00269                         "Para" => "6", 
00270                         "quopri" => "6", 
00271                         "Queue" => "6", 
00272                         "rand" => "6", 
00273                         "random" => "6", 
00274                         "regex" => "6", 
00275                         "regsub" => "6", 
00276                         "rfc822" => "6", 
00277                         "sched" => "6", 
00278                         "sgmllib" => "6", 
00279                         "shelve" => "6", 
00280                         "site" => "6", 
00281                         "sndhdr" => "6", 
00282                         "string" => "6", 
00283                         "sys" => "6", 
00284                         "snmp" => "6", 
00285                         "SimpleHTTPServer" => "6", 
00286                         "StringIO" => "6", 
00287                         "SocketServer" => "6", 
00288                         "tb" => "6", 
00289                         "tempfile" => "6", 
00290                         "toaiff" => "6", 
00291                         "token" => "6", 
00292                         "tokenize" => "6", 
00293                         "traceback" => "6", 
00294                         "tty" => "6", 
00295                         "types" => "6", 
00296                         "tzparse" => "6", 
00297                         "Tkinter" => "6", 
00298                         "urllib" => "6", 
00299                         "urlparse" => "6", 
00300                         "util" => "6", 
00301                         "uu" => "6", 
00302                         "UserDict" => "6", 
00303                         "UserList" => "6", 
00304                         "wave" => "6", 
00305                         "whatsound" => "6", 
00306                         "whichdb" => "6", 
00307                         "whrandom" => "6", 
00308                         "xdrlib" => "6", 
00309                         "zmod" => "6", 
00310                         "array" => "7", 
00311                         "struct" => "7", 
00312                         "self" => "7");
00313 
00314 // Special extensions
00315 
00316 // Each category can specify a PHP function that returns an altered
00317 // version of the keyword.
00318 
00319 
00320 
00321 $this->linkscripts      = array(
00322                         "1" => "donothing", 
00323                         "2" => "donothing", 
00324                         "3" => "donothing", 
00325                         "4" => "donothing", 
00326                         "5" => "donothing", 
00327                         "6" => "donothing", 
00328                         "7" => "donothing");
00329 
00330 }
00331 
00332 
00333 
00334 function donothing($keywordin)
00335 {
00336         return $keywordin;
00337 }
00338 
00339 }
00340 
00341 ?>

Generated on Fri Dec 13 2013 09:06:39 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1