wxPython: How to combine StyledTextCtrl with pygments
Pygments is nice. It colorizes your code, has support for 1001 languages, and you can add your own highlighting scheme with just a few regular expressions. By default, it generates some HTML/CSS however, which is unusable within any editor component in your program. Here’s how to combine it with a StyledTextCtrl wxPython widget – the trick is to write a simle Formatter for pygments that wraps pygments’ default styles (or the ones you defined in your lexer) to some styles you have defined in your StyledTextCtrl. (code after the break)
(more…)







…is what we’ve visited the day before yesterday. An immense archeological site of about 100 km2 – only little of which has been made accessible yet. As it is a bit remote, we’ve been almost the only visitors. Also the smaller site of Balamku, where a colourful fresco can be seen, and toads have been venerated as beings able to wander between the real and the mystical worlds.

