[python-win32] customize colors in pythonwin

Mark Hammond mhammond at skippinet.com.au
Mon Oct 18 01:23:35 CEST 2004


> Is there another way to customize the color of special
> keywords/strings ?
> If not, I suggest the only possibility is to rebuilt the
> scintilla python
> lexer ? I read something about building a lexer in a dll, but
> don't understand
> it completly. Is there a way to do it without compiling the
> whole pytonwin
> extension ?

Check out pythonwin\pywin\scintilla\formatter.py - that is the old Python
implemented lexer.  It should give you a few clues.  I can't recall if the
hooks still exist to allow you to use this formatter - IIRC, you tell
scintilla you are using an external lexer, and it calls by way of messages.

> Because of the great possibilities to customize pythonwin and
> also the use of
> scintilla in my own applications, I wan't to understand the
> python wrapper
> around scintilla. I found the scintilla api and also a api
> for scintilla in
> wxpython. But not all api-funktions are available in
> pythonwin.

In this scintilla directory you will find 'control.py' - this is
hand-maintained, so is falling behind.  Most of the methods are thin
wrappers around SendMessage, so adding in the new ones should be easy.

> dokumentation how pythonwin and scintilla work together or
> have I to study the
> sources ? In later case, what is the best place to start? I
> looked in most of
> the pywin source files and learned a lot, but i miss the
> overview how they work
> together.
> Thanks in advance for any reply :-)

There are no docs, but there is also no magic - Pythonwin just uses the
scintilla API by sending the appropriate messages.

If you make enhancements that others may also like to see, please upload
them to a patch at sourceforge, and I will look at getting them in the next
release.

Mark.



More information about the Python-win32 mailing list