bin Sphinx-Anfänger und bekomme als solcher das Syntax-Highlighting nicht gebacken. Folgenden Code versuche ich bunt werden zu lassen:
Code: Alles auswählen
.. _CodeSnippet :
************************
Code-Schnipsel
************************
Dies ist ein Code-Schnipsel. Hiermit teste ich das Syntax-Highlighting und kriegs nicht hin.
.. sourcecode:: python
def parse_fee ( self, feeStr ) :
valStr = feeStr.split(u' ')[0]
try :
valStr.index ( '.' )
except ValueError :
valStr = '.'.join ( valStr.split(',') )
try :
floatVal = float ( valStr )
except :
raise
else :
valStr = locale.currency ( floatVal )
return 10
Habe Python 2.7, Sphinx 1.1.3, Pygments 1.6.
Hat jemand eine Idee?
Grüße
Humbalan