<title>The Py Manual</title>
<meta name="author" content="Patrick K. O'Brien" />
<meta name="organization" content="Orbtech" />
-<meta name="date" content="2004-03-26" />
+<meta name="date" content="2004-04-15" />
<link rel="stylesheet" href="default.css" type="text/css" />
</head>
<body>
<tr><th class="docinfo-name">Organization:</th>
<td><a class="first last reference" href="http://www.orbtech.com/">Orbtech</a></td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2004-03-26</td></tr>
+<td>2004-04-15</td></tr>
<tr><th class="docinfo-name">Revision:</th>
-<td>1.4</td></tr>
+<td>1.5</td></tr>
</tbody>
</table>
<div class="contents topic" id="contents">
<li><a class="reference" href="#pyshell" id="id12" name="id12">PyShell</a></li>
<li><a class="reference" href="#pywrap" id="id13" name="id13">PyWrap</a></li>
<li><a class="reference" href="#py-modules" id="id14" name="id14">Py modules</a></li>
-<li><a class="reference" href="#decorator-classes" id="id15" name="id15">Decorator classes</a></li>
-<li><a class="reference" href="#projects-using-py" id="id16" name="id16">Projects using Py</a></li>
-<li><a class="reference" href="#history-of-changes" id="id17" name="id17">History of changes</a><ul>
-<li><a class="reference" href="#to-2004" id="id18" name="id18">0.9.4 (1/25/2004 to //2004)</a></li>
-<li><a class="reference" href="#to-1-24-2004" id="id19" name="id19">0.9.3 (9/25/2003 to 1/24/2004)</a></li>
-<li><a class="reference" href="#to-9-25-2003" id="id20" name="id20">0.9.2 (5/3/2003 to 9/25/2003)</a></li>
-<li><a class="reference" href="#to-5-2-2003" id="id21" name="id21">0.9.1 (3/21/2003 to 5/2/2003)</a></li>
-<li><a class="reference" href="#to-3-20-2003" id="id22" name="id22">0.9 (2/27/2003 to 3/20/2003)</a></li>
-<li><a class="reference" href="#to-2-26-2003" id="id23" name="id23">0.8.2 (1/5/2003 to 2/26/2003)</a></li>
-<li><a class="reference" href="#to-12-25-2002" id="id24" name="id24">0.8.1 (12/20/2002 to 12/25/2002)</a></li>
-<li><a class="reference" href="#to-12-16-2002" id="id25" name="id25">0.8 (10/29/2002 to 12/16/2002)</a></li>
-<li><a class="reference" href="#to-8-27-2002" id="id26" name="id26">0.7.2 (2/22/2002 to 8/27/2002)</a></li>
-<li><a class="reference" href="#to-2-21-2002" id="id27" name="id27">0.7.1 (12/12/2001 to 2/21/2002)</a></li>
-<li><a class="reference" href="#to-12-11-2001" id="id28" name="id28">0.7 (10/15/2001 to 12/11/2001)</a></li>
-<li><a class="reference" href="#to-10-12-2001" id="id29" name="id29">0.6.1 (9/19/2001 to 10/12/2001)</a></li>
-<li><a class="reference" href="#to-9-12-2001" id="id30" name="id30">0.6 (8/21/2001 to 9/12/2001)</a></li>
-<li><a class="reference" href="#to-8-20-2001" id="id31" name="id31">0.5.4 (8/17/2001 to 8/20/2001)</a></li>
-<li><a class="reference" href="#id1" id="id32" name="id32">0.5.3 (8/16/2001)</a></li>
-<li><a class="reference" href="#to-8-15-2001" id="id33" name="id33">0.5.2 (8/14/2001 to 8/15/2001)</a></li>
-<li><a class="reference" href="#to-8-14-2001" id="id34" name="id34">0.5.1 (8/10/2001 to 8/14/2001)</a></li>
-<li><a class="reference" href="#id2" id="id35" name="id35">0.5 (8/8/2001)</a></li>
-<li><a class="reference" href="#to-8-7-2001" id="id36" name="id36">0.4 (8/4/2001 to 8/7/2001)</a></li>
-<li><a class="reference" href="#to-8-3-2001" id="id37" name="id37">0.3 (8/2/2001 to 8/3/2001)</a></li>
-<li><a class="reference" href="#to-8-2-2001" id="id38" name="id38">0.2 (7/30/2001 to 8/2/2001)</a></li>
-<li><a class="reference" href="#to-7-19-2001" id="id39" name="id39">0.1 (7/1/2001 to 7/19/2001)</a></li>
-<li><a class="reference" href="#in-the-beginning-there-was-pie-7-1-2001" id="id40" name="id40">In the beginning, there was pie... (7/1/2001)</a></li>
+<li><a class="reference" href="#projects-using-py" id="id15" name="id15">Projects using Py</a></li>
+<li><a class="reference" href="#history-of-changes" id="id16" name="id16">History of changes</a><ul>
+<li><a class="reference" href="#to-2004" id="id17" name="id17">0.9.4 (1/25/2004 to //2004)</a></li>
+<li><a class="reference" href="#to-1-24-2004" id="id18" name="id18">0.9.3 (9/25/2003 to 1/24/2004)</a></li>
+<li><a class="reference" href="#to-9-25-2003" id="id19" name="id19">0.9.2 (5/3/2003 to 9/25/2003)</a></li>
+<li><a class="reference" href="#to-5-2-2003" id="id20" name="id20">0.9.1 (3/21/2003 to 5/2/2003)</a></li>
+<li><a class="reference" href="#to-3-20-2003" id="id21" name="id21">0.9 (2/27/2003 to 3/20/2003)</a></li>
+<li><a class="reference" href="#to-2-26-2003" id="id22" name="id22">0.8.2 (1/5/2003 to 2/26/2003)</a></li>
+<li><a class="reference" href="#to-12-25-2002" id="id23" name="id23">0.8.1 (12/20/2002 to 12/25/2002)</a></li>
+<li><a class="reference" href="#to-12-16-2002" id="id24" name="id24">0.8 (10/29/2002 to 12/16/2002)</a></li>
+<li><a class="reference" href="#to-8-27-2002" id="id25" name="id25">0.7.2 (2/22/2002 to 8/27/2002)</a></li>
+<li><a class="reference" href="#to-2-21-2002" id="id26" name="id26">0.7.1 (12/12/2001 to 2/21/2002)</a></li>
+<li><a class="reference" href="#to-12-11-2001" id="id27" name="id27">0.7 (10/15/2001 to 12/11/2001)</a></li>
+<li><a class="reference" href="#to-10-12-2001" id="id28" name="id28">0.6.1 (9/19/2001 to 10/12/2001)</a></li>
+<li><a class="reference" href="#to-9-12-2001" id="id29" name="id29">0.6 (8/21/2001 to 9/12/2001)</a></li>
+<li><a class="reference" href="#to-8-20-2001" id="id30" name="id30">0.5.4 (8/17/2001 to 8/20/2001)</a></li>
+<li><a class="reference" href="#id1" id="id31" name="id31">0.5.3 (8/16/2001)</a></li>
+<li><a class="reference" href="#to-8-15-2001" id="id32" name="id32">0.5.2 (8/14/2001 to 8/15/2001)</a></li>
+<li><a class="reference" href="#to-8-14-2001" id="id33" name="id33">0.5.1 (8/10/2001 to 8/14/2001)</a></li>
+<li><a class="reference" href="#id2" id="id34" name="id34">0.5 (8/8/2001)</a></li>
+<li><a class="reference" href="#to-8-7-2001" id="id35" name="id35">0.4 (8/4/2001 to 8/7/2001)</a></li>
+<li><a class="reference" href="#to-8-3-2001" id="id36" name="id36">0.3 (8/2/2001 to 8/3/2001)</a></li>
+<li><a class="reference" href="#to-8-2-2001" id="id37" name="id37">0.2 (7/30/2001 to 8/2/2001)</a></li>
+<li><a class="reference" href="#to-7-19-2001" id="id38" name="id38">0.1 (7/1/2001 to 7/19/2001)</a></li>
+<li><a class="reference" href="#in-the-beginning-there-was-pie-7-1-2001" id="id39" name="id39">In the beginning, there was pie... (7/1/2001)</a></li>
</ul>
</li>
</ul>
of whimsically-named Python programs and modules that began as the
PyCrust project. So Py is really several things: a set of standalone
programs, including the original PyCrust program, a library of Python
-source code modules that can be used in your own programs, a set of
-decorator classes that enhance the wxPython class library, and as many
+source code modules that can be used in your own programs, and as many
examples of bad "pie" puns as I can come up with. (If you're going to
do something, you might as well do it all the way, right?) Py uses
Python and wxPython, so it works equally well on Windows, Linux and
<p>Py also contains a collection of modules that you can use in your own
wxPython applications to provide similar services, either for your own
use during development, or as an interface for users of your programs.
-These modules are the same ones used by all the Py programs. In
-addition, Py contains a set of decorator classes that enhance the
-wxPython class library, by dynamically attaching docstrings and call
-signatures at runtime.</p>
+These modules are the same ones used by all the Py programs.</p>
</div>
<div class="section" id="py-standalone-programs">
<h1><a class="toc-backref" href="#id7" name="py-standalone-programs">Py standalone programs</a></h1>
shell namespace, the local variable <tt class="literal"><span class="pre">app</span></tt> is assigned to your
application instance. In this way you can introspect your entire
application within the PyCrust shell, as well as the PyFilling
-namespace viewer. And through the use of the Py decorator classes,
-PyCrust can display wxPython function and method signatures as well as
-docstrings for the entire wxPython library.</p>
+namespace viewer.</p>
</div>
<div class="section" id="py-modules">
<h1><a class="toc-backref" href="#id14" name="py-modules">Py modules</a></h1>
required, PyCrust will work just as well with your interpreter as with
its default interpreter.</p>
</div>
-<div class="section" id="decorator-classes">
-<h1><a class="toc-backref" href="#id15" name="decorator-classes">Decorator classes</a></h1>
-<p>Py contains a set of decorator classes that enhance the wxPython class
-library, by dynamically attaching docstrings and call signatures at
-runtime.</p>
-</div>
<div class="section" id="projects-using-py">
-<h1><a class="toc-backref" href="#id16" name="projects-using-py">Projects using Py</a></h1>
+<h1><a class="toc-backref" href="#id15" name="projects-using-py">Projects using Py</a></h1>
<ul class="simple">
<li><a class="reference" href="http://conflictsolver.sourceforge.net/">Conflict Solver</a></li>
<li><a class="reference" href="http://www.gnumed.org/">Gnumed</a></li>
</ul>
</div>
<div class="section" id="history-of-changes">
-<h1><a class="toc-backref" href="#id17" name="history-of-changes">History of changes</a></h1>
+<h1><a class="toc-backref" href="#id16" name="history-of-changes">History of changes</a></h1>
<p>This section lists all the changes that have been made to the Py
programs and modules, since the beginning.</p>
<div class="section" id="to-2004">
-<h2><a class="toc-backref" href="#id18" name="to-2004">0.9.4 (1/25/2004 to //2004)</a></h2>
+<h2><a class="toc-backref" href="#id17" name="to-2004">0.9.4 (1/25/2004 to //2004)</a></h2>
<p>Removed wxd decorators in favor of new SWIG-generated docstrings.</p>
<p>Removed docs tabs from crust interface:
* wxPython Docs
empty dictionary.</p>
</div>
<div class="section" id="to-1-24-2004">
-<h2><a class="toc-backref" href="#id19" name="to-1-24-2004">0.9.3 (9/25/2003 to 1/24/2004)</a></h2>
+<h2><a class="toc-backref" href="#id18" name="to-1-24-2004">0.9.3 (9/25/2003 to 1/24/2004)</a></h2>
<p>Fun and games with dynamic renaming. Details of any other changes
were lost in the confusion. I'll try to do better in the future.</p>
</div>
<div class="section" id="to-9-25-2003">
-<h2><a class="toc-backref" href="#id20" name="to-9-25-2003">0.9.2 (5/3/2003 to 9/25/2003)</a></h2>
+<h2><a class="toc-backref" href="#id19" name="to-9-25-2003">0.9.2 (5/3/2003 to 9/25/2003)</a></h2>
<p>Changed to the new prefix-less "wx" package:</p>
<pre class="literal-block">
import wx
</pre>
</div>
<div class="section" id="to-5-2-2003">
-<h2><a class="toc-backref" href="#id21" name="to-5-2-2003">0.9.1 (3/21/2003 to 5/2/2003)</a></h2>
+<h2><a class="toc-backref" href="#id20" name="to-5-2-2003">0.9.1 (3/21/2003 to 5/2/2003)</a></h2>
<p>PyCrust is dead! Long live Py!</p>
<ul class="simple">
<li>Renamed <tt class="literal"><span class="pre">PyCrust</span></tt> package to <tt class="literal"><span class="pre">py</span></tt>.</li>
<p>Improved handling of <tt class="literal"><span class="pre">sys.path</span></tt> to mimic the standard Python shell.</p>
</div>
<div class="section" id="to-3-20-2003">
-<h2><a class="toc-backref" href="#id22" name="to-3-20-2003">0.9 (2/27/2003 to 3/20/2003)</a></h2>
+<h2><a class="toc-backref" href="#id21" name="to-3-20-2003">0.9 (2/27/2003 to 3/20/2003)</a></h2>
<p>Added fontIncrease, fontDecrease, fontDefault signals, receivers and
keybindings:</p>
<pre class="literal-block">
<p>Added <tt class="literal"><span class="pre">wxd</span></tt> directory with decoration classes.</p>
</div>
<div class="section" id="to-2-26-2003">
-<h2><a class="toc-backref" href="#id23" name="to-2-26-2003">0.8.2 (1/5/2003 to 2/26/2003)</a></h2>
+<h2><a class="toc-backref" href="#id22" name="to-2-26-2003">0.8.2 (1/5/2003 to 2/26/2003)</a></h2>
<p>Wrapped <tt class="literal"><span class="pre">sys.ps1</span></tt>, <tt class="literal"><span class="pre">sys.ps2</span></tt>, and <tt class="literal"><span class="pre">sys.ps3</span></tt> in <tt class="literal"><span class="pre">str()</span></tt>.
(Thanks, Kieran Holland.)</p>
<p>Fixed minor things found by PyChecker.</p>
<p>More Filling!!! The namespace tree is now dynamically updated.</p>
</div>
<div class="section" id="to-12-25-2002">
-<h2><a class="toc-backref" href="#id24" name="to-12-25-2002">0.8.1 (12/20/2002 to 12/25/2002)</a></h2>
+<h2><a class="toc-backref" href="#id23" name="to-12-25-2002">0.8.1 (12/20/2002 to 12/25/2002)</a></h2>
<p>Improved keyboard handling with Autocomplete active. You can now use
Enter as well as Tab to select an item from the list.</p>
<p>Disabled autocomplete for lists of 2000 items or more. The current
<p>Fixed handling of icon. Added <tt class="literal"><span class="pre">images.py</span></tt> file.</p>
</div>
<div class="section" id="to-12-16-2002">
-<h2><a class="toc-backref" href="#id25" name="to-12-16-2002">0.8 (10/29/2002 to 12/16/2002)</a></h2>
+<h2><a class="toc-backref" href="#id24" name="to-12-16-2002">0.8 (10/29/2002 to 12/16/2002)</a></h2>
<p>Added "help" to startup banner info.</p>
<p>Made all <tt class="literal"><span class="pre">wx</span></tt> and <tt class="literal"><span class="pre">stc</span></tt> imports explicit. No more <tt class="literal"><span class="pre">import</span> <span class="pre">*</span></tt>.</p>
<p>Replaced use of the <tt class="literal"><span class="pre">wx</span></tt> module's <tt class="literal"><span class="pre">true</span></tt> and <tt class="literal"><span class="pre">false</span></tt> with
handler to free up the CPU.</p>
</div>
<div class="section" id="to-8-27-2002">
-<h2><a class="toc-backref" href="#id26" name="to-8-27-2002">0.7.2 (2/22/2002 to 8/27/2002)</a></h2>
+<h2><a class="toc-backref" href="#id25" name="to-8-27-2002">0.7.2 (2/22/2002 to 8/27/2002)</a></h2>
<p>Tweaked <tt class="literal"><span class="pre">getAttributeNames()</span></tt> to pick up a few more attributes:</p>
<pre class="literal-block">
'__bases__', '__class__', '__dict__', '__name__', 'func_closure',
<tt class="literal"><span class="pre">raw_input</span></tt>.</p>
</div>
<div class="section" id="to-2-21-2002">
-<h2><a class="toc-backref" href="#id27" name="to-2-21-2002">0.7.1 (12/12/2001 to 2/21/2002)</a></h2>
+<h2><a class="toc-backref" href="#id26" name="to-2-21-2002">0.7.1 (12/12/2001 to 2/21/2002)</a></h2>
<p>Fixed <tt class="literal"><span class="pre">OnChar()</span></tt> issues effecting European keyboards, as reported by
Jean-Michel Fauth.</p>
<p>Fixed <tt class="literal"><span class="pre">introspect.py</span></tt> issue with xmlrpc objects reported by Kevin
<p>Improved call tip positioning calculation.</p>
</div>
<div class="section" id="to-12-11-2001">
-<h2><a class="toc-backref" href="#id28" name="to-12-11-2001">0.7 (10/15/2001 to 12/11/2001)</a></h2>
+<h2><a class="toc-backref" href="#id27" name="to-12-11-2001">0.7 (10/15/2001 to 12/11/2001)</a></h2>
<p>Changed how command history retrieval functions work. Added Alt-P,
Alt-N as keybindings for Retrieve-Previous, Retrieve-Next.</p>
<p>Added full support for multi-line commands, similar to IDLE.</p>
<p>Fixed bug in <tt class="literal"><span class="pre">introspect.getCallTip()</span></tt>, reported by Kevin Altis.</p>
</div>
<div class="section" id="to-10-12-2001">
-<h2><a class="toc-backref" href="#id29" name="to-10-12-2001">0.6.1 (9/19/2001 to 10/12/2001)</a></h2>
+<h2><a class="toc-backref" href="#id28" name="to-10-12-2001">0.6.1 (9/19/2001 to 10/12/2001)</a></h2>
<p>Changed <tt class="literal"><span class="pre">Shell.run()</span></tt> to always position to the end of existing
text, as suggested by Raul Cota.</p>
<p>Changed <tt class="literal"><span class="pre">introspect.getAllAttributeNames()</span></tt> to break circular
returns incomplete info.</p>
</div>
<div class="section" id="to-9-12-2001">
-<h2><a class="toc-backref" href="#id30" name="to-9-12-2001">0.6 (8/21/2001 to 9/12/2001)</a></h2>
+<h2><a class="toc-backref" href="#id29" name="to-9-12-2001">0.6 (8/21/2001 to 9/12/2001)</a></h2>
<p>Added <tt class="literal"><span class="pre">PyFilling.py</span></tt> and <tt class="literal"><span class="pre">filling.py</span></tt>.</p>
<p><tt class="literal"><span class="pre">PyShell.py</span></tt> and <tt class="literal"><span class="pre">PyFilling.py</span></tt> can now be run standalone, as well
as <tt class="literal"><span class="pre">PyCrust.py</span></tt>.</p>
<p>Added support for distutils installations.</p>
</div>
<div class="section" id="to-8-20-2001">
-<h2><a class="toc-backref" href="#id31" name="to-8-20-2001">0.5.4 (8/17/2001 to 8/20/2001)</a></h2>
+<h2><a class="toc-backref" href="#id30" name="to-8-20-2001">0.5.4 (8/17/2001 to 8/20/2001)</a></h2>
<p>Changed default font size under Linux to:</p>
<pre class="literal-block">
'size' : 12,
anticipation of <tt class="literal"><span class="pre">PyFilling.py</span></tt>.</p>
</div>
<div class="section" id="id1">
-<h2><a class="toc-backref" href="#id32" name="id1">0.5.3 (8/16/2001)</a></h2>
+<h2><a class="toc-backref" href="#id31" name="id1">0.5.3 (8/16/2001)</a></h2>
<p>Added patch to <tt class="literal"><span class="pre">PyCrust.py</span></tt> to fix wxPython bug:</p>
<pre class="literal-block">
wxID_SELECTALL = NewId() # This *should* be defined by wxPython.
</pre>
</div>
<div class="section" id="to-8-15-2001">
-<h2><a class="toc-backref" href="#id33" name="to-8-15-2001">0.5.2 (8/14/2001 to 8/15/2001)</a></h2>
+<h2><a class="toc-backref" href="#id32" name="to-8-15-2001">0.5.2 (8/14/2001 to 8/15/2001)</a></h2>
<p>Shortened module names by dropping "PyCrust" as a prefix.</p>
<p>Changed <tt class="literal"><span class="pre">version</span></tt> to <tt class="literal"><span class="pre">VERSION</span></tt> in <tt class="literal"><span class="pre">version</span></tt> module.</p>
<p>Added Options menu to PyCrust application.</p>
with now.</p>
</div>
<div class="section" id="to-8-14-2001">
-<h2><a class="toc-backref" href="#id34" name="to-8-14-2001">0.5.1 (8/10/2001 to 8/14/2001)</a></h2>
+<h2><a class="toc-backref" href="#id33" name="to-8-14-2001">0.5.1 (8/10/2001 to 8/14/2001)</a></h2>
<p>Added <tt class="literal"><span class="pre">introspect</span></tt> module.</p>
<p>Moved some functionality from <tt class="literal"><span class="pre">PyCrustInterp</span></tt> to <tt class="literal"><span class="pre">introspect</span></tt>.</p>
<p>Changed <tt class="literal"><span class="pre">introspect.getRoot()</span></tt> to no longer remove whitespace from
</pre>
</div>
<div class="section" id="id2">
-<h2><a class="toc-backref" href="#id35" name="id2">0.5 (8/8/2001)</a></h2>
+<h2><a class="toc-backref" href="#id34" name="id2">0.5 (8/8/2001)</a></h2>
<p>Mostly just a final version change before creating a release.</p>
</div>
<div class="section" id="to-8-7-2001">
-<h2><a class="toc-backref" href="#id36" name="to-8-7-2001">0.4 (8/4/2001 to 8/7/2001)</a></h2>
+<h2><a class="toc-backref" href="#id35" name="to-8-7-2001">0.4 (8/4/2001 to 8/7/2001)</a></h2>
<p>Changed version/revision handling.</p>
<p>Fixed bugs.</p>
</div>
<div class="section" id="to-8-3-2001">
-<h2><a class="toc-backref" href="#id37" name="to-8-3-2001">0.3 (8/2/2001 to 8/3/2001)</a></h2>
+<h2><a class="toc-backref" href="#id36" name="to-8-3-2001">0.3 (8/2/2001 to 8/3/2001)</a></h2>
<p>Removed lots of cruft.</p>
<p>Added lots of docstrings.</p>
<p>Imported to CVS repository at SourceForge.</p>
<p>Added call tips.</p>
</div>
<div class="section" id="to-8-2-2001">
-<h2><a class="toc-backref" href="#id38" name="to-8-2-2001">0.2 (7/30/2001 to 8/2/2001)</a></h2>
+<h2><a class="toc-backref" href="#id37" name="to-8-2-2001">0.2 (7/30/2001 to 8/2/2001)</a></h2>
<p>Renamed several files.</p>
<p>Added command autocompletion.</p>
<p>Added menus to PyCrust.py: File, Edit and Help.</p>
<tt class="literal"><span class="pre">PyCrustAlaMode.py</span></tt>, and <tt class="literal"><span class="pre">PyCrustMinimus.py</span></tt>.</p>
</div>
<div class="section" id="to-7-19-2001">
-<h2><a class="toc-backref" href="#id39" name="to-7-19-2001">0.1 (7/1/2001 to 7/19/2001)</a></h2>
+<h2><a class="toc-backref" href="#id38" name="to-7-19-2001">0.1 (7/1/2001 to 7/19/2001)</a></h2>
<p>Added basic syntax coloring much like Boa.</p>
<p>Added read-only logging much like IDLE.</p>
<p>Can retrieve a previous command by putting the cursor back on that
<p>Created SourceForge account, but nothing was posted.</p>
</div>
<div class="section" id="in-the-beginning-there-was-pie-7-1-2001">
-<h2><a class="toc-backref" href="#id40" name="in-the-beginning-there-was-pie-7-1-2001">In the beginning, there was pie... (7/1/2001)</a></h2>
+<h2><a class="toc-backref" href="#id39" name="in-the-beginning-there-was-pie-7-1-2001">In the beginning, there was pie... (7/1/2001)</a></h2>
<p>Blame it all on IDLE, Boa and PythonWin. I was using all three, got
frustrated with their dissimilarities, and began to let everyone know
how I felt. At the same time, Scintilla looked like an interesting