| Home | Trees | Indices | Help |
|
|---|
|
|
Editra Control Library: OutputBuffer
This module contains classes that are usefull for displaying output from running
tasks and processes. The classes are divided into three main catagories, gui
classes, mixins, and thread classes. All the classes can be used together to
easily create multithreaded gui display classes without neededing to worry about
the details and thread safety of the gui.
For example usage of these classes see ed_log and the Editra's Launch plugin
Class OutputBuffer:
This is the main class exported by ths module. It provides a readonly output
display buffer that when used with the other classes in this module provides an
easy way to display continous output from other processes and threads. It
provides two methods for subclasses to override if they wish to perform custom
handling.
- Override the ApplyStyles method to do any processing and coloring of the
text as it is put in the buffer.
- Override the DoHotSpotClicked method to handle any actions to take when a
hotspot has been clicked in the buffer.
- Override the DoUpdatesEmpty method to perform any idle processing when no
new text is waiting to be processed.
Class ProcessBufferMixin:
Mixin class for the L{OutputBuffer} class that provides handling for when an
OutputBuffer is used with a L{ProcessThread}. It provides three methods that can
be overridden in subclasses to perform extra processing.
- DoProcessStart: Called as the process is being started in the ProcessThread,
it recieves the process command string as an argument.
- DoFilterInput: Called as each chunk of output comes from the running process
use it to filter the results before displaying them in the
buffer.
- DoProcessExit: Called when the running process has exited. It recieves the
processes exit code as a parameter.
Class ProcessThread:
Thread class for running subprocesses and posting the output to an
L{OutputBuffer} via events.
Class TaskThread:
Thread class for running a callable. For optimal performance and resposiveness
the callable should be a generator object. All results are directed to an
L{OutputBuffer} through its AppendUpdate method.
Requirements:
* wxPython 2.8
* Macintosh/Linux/Unix Python 2.4+
* Windows Python 2.5+ (ctypes is needed)
Author: Cody Precord <cprecord@editra.org>
|
|||
|
OutputBufferEvent Event for data transfer and signaling actions in the OutputBuffer |
|||
|
OutputBuffer OutputBuffer is a general purpose output display for showing text. |
|||
|
ProcessBufferMixin Mixin class for OutputBuffer to handle events generated by a ProcessThread. |
|||
|
ProcessThread Run a subprocess in a separate thread. |
|||
|
TaskThread Run a task in its own thread. |
|||
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Apr 6 23:23:45 2009 | http://epydoc.sourceforge.net |