<!DOCTYPE Highlight>
<Highlight wildcards="*.py" name="Python">

 <Items>
  <Text                style=""  color="#000000" />
  <Keyword             style=""  color="#0f0ff0" />
  <Function            style=""  color="#808000" />
  <FunctionDef         style="b" color="#e00f0f" />
  <ClassDef            style="b" color="#f00f0f" />
  <Number              style=""  color="#808080" />
  <Module              style=""  color="#f00f0f" />
  <String              style=""  color="#009000" />
  <Char                style=""  color="#ff00ff" />
  <Brace               style=""  color="#4040b0" />
  <Memo                style=""  color="#888888" />
  <EscapedChar         style=""  color="#F08050" />
 </Items>

 <Break>

  <normal>
   <citem item="" regexp="'''"  mode="until, include" lineEndContent="multistring1" />
   <citem item="" regexp="&quot;&quot;&quot;"  mode="until, include" lineEndContent="multistring2" />
   <citem item="" regexp="$"  mode="until" />
  </normal>

  <multistring1>
   <citem item="" regexp="'''" mode="until, exclude, allowfull" />
   <citem item="" regexp="'''" lineEndContent="normal" />
  </multistring1>

  <multistring2>
   <citem item="" regexp="&quot;&quot;&quot;" mode="until, exclude, allowfull" />
   <citem item="" regexp="&quot;&quot;&quot;" lineEndContent="normal" />
  </multistring2>
 </Break>

 <Contents>

  <normal>
   <citem item="Text" regexp="\s+" />

   <citem item="Keyword" regexp="import\s" lineEndContent="module1" />
   <citem item="Keyword" regexp="from\s" lineEndContent="module2" />
   <citem item="Keyword" regexp="def\s" lineEndContent="funcdef" />
   <citem item="Keyword" regexp="class\s" lineEndContent="classdef" />

   <citem item="String" regexp="'''" lineEndContent="multistring1" />
   <citem item="String" regexp="&quot;&quot;&quot;" lineEndContent="multistring2" />

   <citem item="String"  regexp="&quot;" lineEndContent="string1" />
   <citem item="String"  regexp="'"      lineEndContent="string2" />

   <citem item="Memo" regexp="\#.*" />

   <citem item="Keyword" regexp="\w+" keyword="self and assert break class continue def del elif else except exec finally for global if in is lambda not or pass print raise return try while" caseSensitive="true"  lineEndContent="normal" />
   <citem item="Function" regexp="\w+" keyword="abs apply callable chr cmp coerce compile delattr dir divmod eval exec execfile filter float getattr globals hasattr hash hex id input int len locals long map max min oct open ord pow range raw_input reduce reload repr round setattr str tuple type vars xrange atof atoi atol expandtabs find rfind index rindex count split splitfields join joinfields strip lstrip rstrip swapcase upper lower ljust rjust center zfill os sys path" caseSensitive="true" lineEndContent="normal" />

   <citem item="Number"   regexp="\d*\.\d+[eE]\+\d+[uUfFlL]?" lineEndContent="normal" />
   <citem item="Number"   regexp="\d*\.\d+[uUfFlL]?" lineEndContent="normal" />
   <citem item="Number"   regexp="0[xX][\da-fA-F]+[uUlL]?" lineEndContent="normal" />
   <citem item="Number"   regexp="0[0-7]+[uUlL]?" lineEndContent="normal" />
   <citem item="Number"   regexp="\d+[uUlL]?"  lineEndContent="normal" />

   <citem item="Brace" regexp="[\(\)\[\]{}\.\:]+" lineEndContent="normal" />

   <citem item="Text" regexp="[\w_]+" lineEndContent="normal" />
   <citem item="Text" regexp="\s+"    lineEndContent="normal" />
   <citem item="Text" regexp="\W"     lineEndContent="normal" />
  </normal>

  <multistring1>
   <citem item="String" regexp="'''" mode="until, exclude, allowfull" />
   <citem item="String" regexp="'''" lineEndContent="normal" />
  </multistring1>

  <multistring2>
   <citem item="String" regexp="&quot;&quot;&quot;" mode="until, exclude, allowfull" />
   <citem item="String" regexp="&quot;&quot;&quot;" lineEndContent="normal" />
  </multistring2>

  <string1>
   <citem item="String"    regexp="[^&quot;\\]+" />
   <citem item="Char"      regexp="\\." />
   <citem item="String"    regexp="&quot;" lineEndContent="normal" />
  </string1>

  <string2>
   <citem item="String"    regexp="[^'\\]+" />
   <citem item="Char"      regexp="\\." />
   <citem item="String"    regexp="'" lineEndContent="normal" />
  </string2>

  <module1>
        <citem item="Module"  regexp=".*" lineEndContent="normal" />
  </module1>

  <funcdef>
        <citem item="FunctionDef"  regexp="[^ (]*" lineEndContent="normal" />
  </funcdef>

  <classdef>
        <citem item="ClassDef"  regexp="[^ :(]*" lineEndContent="normal" />
  </classdef>

  <module2>
        <citem item="Module"  regexp="import" mode="until, exclude" />
        <citem item="Keyword"  regexp="import" />
        <citem item="Module"  regexp=".*" lineEndContent="normal" />
  </module2>

 </Contents>

</Highlight>