Syntax highlighting

As you enter code into the shell, PyCrust changes the color of the text depending on its significance. For example, Python keywords appear in one color, literal string values in another, and comments in yet another. This provides a visual confirmation that you haven't missed any trailing quotes, or misspelled a Python keyword.

Many of the features of PyCrust are made possible by a very powerful text control distributed with wxPython. The wx.stc.StyledTextCtrl is a wxPython wrapper of the Scintilla source code editing component developed by Neil Hodgson. Scintilla (www.scintilla.org) is used by a variety of source code editing applications, including the demo program shipped with wxPython. Although it was a struggle to make a source code editor behave like a wxPython shell, it would have been nearly impossible to create PyCrust without Scintilla.

Was this article helpful?

0 0

Post a comment