I was wondering if it was possible to use pygments with wxPython?
I want to use it on the text_ctrl widget.
If it is not possible on that widget but is possible on an other please tell me...

Recommended Answers

All 5 Replies

No. It may be possible with some sort of web page control, but that solution would be so convoluted that I don't even want to think about it.

Are you just trying to get syntax highlighting, or do you want pygments specifically? For the former, use wx.StyledTextCtrl.

Well Syntax-highlighting actually, but in the past I had already found the wx.StyledTextCtrl but I didn't found any real documentation on how to use it :s
you know a source perhaps?

Okay I followed snippsat his example and changed some things to see if I understand, and I do. (Scru's link is a good reference but to learn from it's quite heard)

I know how to colorize the text and I think I'm even capable of Syntax-highlighting a certain text. However I don't know how to colorize a text when it's been typed, cause that's how a text-editor works. you can add content which is also being colorised

somebody knows how I can capture what the user types before it is being passed to the screen?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.