[wxPython-users] add some languages to wxstyledtextctrl

kib2 kib2 at free.fr
Sun Jul 8 01:15:08 PDT 2007


Josiah Carlson a écrit :
> 
> The documentation for the wx.stc.StyledTextCtrl is available at
> scintilla.org .  I'm pretty sure that it supports D, but I can't
> remember the url for all of the languages that it supports.  You can get
> the listing with the following Python code:
> 
>     import wx.stc
>     [i for i in dir(wx.stc) if i.startswith('STC_LEX')]

Thanks for the hint, Lout was not added on the yellowbrain page.
I do not see D, but maybe it has been embedded in CPP.

For your snippet, just change 'STC_LEX' with  'STC_LEX_' because it 
catches 'STC_LEXER_START', ie :

import wx.stc
langs = [i for i in dir(wx.stc) if i.startswith('STC_LEX_')]
for l in langs: print l[8:],;

> 
>  - Josiah
> 

Kib².





More information about the wxpython-users mailing list