wiki:CodeExampleMacro

Version 2 (modified by nuald, 5 years ago) (diff)

--

CodeExample

Description

The Trac plugin for code examples colouring. It support three types of examples - a simple, a correct and an incorrect.

All rights reserved by Codedgers Inc. (http://codedgers.com).

Bugs/Feature Requests

Existing bugs and feature requests for CodeExampleMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out CodeExampleMacro from here using Subversion, or browse the source with Trac.

Example

The simple example:

{{{
#!CodeExample
#!python
    def apply_timer(self):
        timer = QTimer(self)
        self.connect(timer, SIGNAL('timeout()'), self.update_statusbar)
        timer.start(settings.HINTS_UPDATE_PERIOD)
}}}

will be rendered as:

The simple example image.

The incorrect example:

{{{
#!BadCodeExample
#!python
    def create_hint_list(self):
        self.hints.extend(self.globals.get_hint_list())
}}}

will be rendered as:

The incorrect example image.

The correct example:

{{{
#!GoodCodeExample
#!python
    def update_statusbar(self):
        self.combo_box.insertItem(0, self.hints.get_current_hint())
        self.combo_box.setCurrentIndex(0)
}}}

will be rendered as:

The correct example image.

Recent Changes

[11775] by rjollos on 2012-07-25 09:01:47
Part of [11766].
[11766] by rjollos on 2012-07-24 06:33:37
Renamed 0.11 directory to trunk.
[10843] by rjollos on 2011-10-27 08:17:57
Adding configuration file that results in svn revision info being added to the egg file.

Author/Contributors

Author: nuald
Contributors:

Attachments (7)

Download all attachments as: .zip