O'Reilly logo

WxPython Application Development Cookbook by Cody Precord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Annotating StyledTextCtrl

The new version of the StyledTextCtrl class in wxPython 3.0 uses an updated version of Scintilla, which has added a new feature to add annotations to the text being shown in the buffer. Annotations can be used to display read-only text underneath each line of editable text. The annotations can be used to display inline diagnostic messages to the user. In this recipe, we will use them to extend PythonCodeEditor from the previous recipe to show pep8 warning messages in the editor.

Getting started

This recipe uses an external module called pep8, which should be installed prior to trying this recipe. The pep8 module can be installed using pip or by downloading it from pypi (https://pypi.python.org/pypi/pep8).

How to do it…

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required