Pygments GTK Rendering
I found in Pete Savage’s blog and entry about using GtkSourceView in pygtk. The new version of GtkSourceView absolutely rocks, the old one does not because the ruby highlighter and more complex stuff simply does not work because the library is somewhat limited.
As a proof of concept I tried to integrate pygments into a pygtk window and it worked :-) Of course it doesn’t allow realtime updating thus it’s impossible to use it as editor component (at least for now) but it makes a good source view.
You can find the sources here: gtkpygments.py
Could you please update the link? I landed on some strange code browser, was bewildered and couldn’t find it. Thank you.
Comment by Wok — Monday, December 10th, 2007 @ 6:54 amHi. It’s now part of the sandbox mercurial repository: http://dev.pocoo.org/hg/sandbox
Because there are no partial checkouts in mercurial yet, here the direct link to the file on the webinterface: http://dev.pocoo.org/hg/sandbox/file/tip/gtkpygments.py
Regards,
Comment by Armin Ronacher — Monday, December 10th, 2007 @ 7:30 amArmin
Hi. I since discovered that the sentences summing up the revision were links, so I can yet browse Mercurial-managed code. Thought you would be glad to know you helped me learn something. Besides, nice proof of concept. Regards, Wok
Comment by Wok — Saturday, January 5th, 2008 @ 3:40 am