]> git.saurik.com Git - wxWidgets.git/blame - wxPython/docs/PyManual.html
aui this really has to be BOOL and not bool
[wxWidgets.git] / wxPython / docs / PyManual.html
CommitLineData
8eda5e35
RD
1<?xml version="1.0" encoding="iso-8859-1" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
974a50f1 6<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
8eda5e35
RD
7<title>The Py Manual</title>
8<meta name="author" content="Patrick K. O'Brien" />
9<meta name="organization" content="Orbtech" />
40efbdda 10<meta name="date" content="2004-04-15" />
974a50f1
RD
11<style type="text/css">
12
13/*
14:Author: David Goodger
15:Contact: goodger@users.sourceforge.net
16:Date: $Date$
17:Revision: $Revision$
18:Copyright: This stylesheet has been placed in the public domain.
19
20Default cascading style sheet for the HTML output of Docutils.
21
22See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
23customize this style sheet.
24*/
25
26/* used to remove borders from tables and images */
27.borderless, table.borderless td, table.borderless th {
28 border: 0 }
29
30table.borderless td, table.borderless th {
31 /* Override padding for "table.docutils td" with "! important".
32 The right padding separates the table cells. */
33 padding: 0 0.5em 0 0 ! important }
34
35.first {
36 /* Override more specific margin styles with "! important". */
37 margin-top: 0 ! important }
38
39.last, .with-subtitle {
40 margin-bottom: 0 ! important }
41
42.hidden {
43 display: none }
44
45a.toc-backref {
46 text-decoration: none ;
47 color: black }
48
49blockquote.epigraph {
50 margin: 2em 5em ; }
51
52dl.docutils dd {
53 margin-bottom: 0.5em }
54
55/* Uncomment (and remove this text!) to get bold-faced definition list terms
56dl.docutils dt {
57 font-weight: bold }
58*/
59
60div.abstract {
61 margin: 2em 5em }
62
63div.abstract p.topic-title {
64 font-weight: bold ;
65 text-align: center }
66
67div.admonition, div.attention, div.caution, div.danger, div.error,
68div.hint, div.important, div.note, div.tip, div.warning {
69 margin: 2em ;
70 border: medium outset ;
71 padding: 1em }
72
73div.admonition p.admonition-title, div.hint p.admonition-title,
74div.important p.admonition-title, div.note p.admonition-title,
75div.tip p.admonition-title {
76 font-weight: bold ;
77 font-family: sans-serif }
78
79div.attention p.admonition-title, div.caution p.admonition-title,
80div.danger p.admonition-title, div.error p.admonition-title,
81div.warning p.admonition-title {
82 color: red ;
83 font-weight: bold ;
84 font-family: sans-serif }
85
86/* Uncomment (and remove this text!) to get reduced vertical space in
87 compound paragraphs.
88div.compound .compound-first, div.compound .compound-middle {
89 margin-bottom: 0.5em }
90
91div.compound .compound-last, div.compound .compound-middle {
92 margin-top: 0.5em }
93*/
94
95div.dedication {
96 margin: 2em 5em ;
97 text-align: center ;
98 font-style: italic }
99
100div.dedication p.topic-title {
101 font-weight: bold ;
102 font-style: normal }
103
104div.figure {
105 margin-left: 2em ;
106 margin-right: 2em }
107
108div.footer, div.header {
109 clear: both;
110 font-size: smaller }
111
112div.line-block {
113 display: block ;
114 margin-top: 1em ;
115 margin-bottom: 1em }
116
117div.line-block div.line-block {
118 margin-top: 0 ;
119 margin-bottom: 0 ;
120 margin-left: 1.5em }
121
122div.sidebar {
123 margin-left: 1em ;
124 border: medium outset ;
125 padding: 1em ;
126 background-color: #ffffee ;
127 width: 40% ;
128 float: right ;
129 clear: right }
130
131div.sidebar p.rubric {
132 font-family: sans-serif ;
133 font-size: medium }
134
135div.system-messages {
136 margin: 5em }
137
138div.system-messages h1 {
139 color: red }
140
141div.system-message {
142 border: medium outset ;
143 padding: 1em }
144
145div.system-message p.system-message-title {
146 color: red ;
147 font-weight: bold }
148
149div.topic {
150 margin: 2em }
151
152h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
153h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
154 margin-top: 0.4em }
155
156h1.title {
157 text-align: center }
158
159h2.subtitle {
160 text-align: center }
161
162hr.docutils {
163 width: 75% }
164
165img.align-left {
166 clear: left }
167
168img.align-right {
169 clear: right }
170
171ol.simple, ul.simple {
172 margin-bottom: 1em }
173
174ol.arabic {
175 list-style: decimal }
176
177ol.loweralpha {
178 list-style: lower-alpha }
179
180ol.upperalpha {
181 list-style: upper-alpha }
182
183ol.lowerroman {
184 list-style: lower-roman }
185
186ol.upperroman {
187 list-style: upper-roman }
188
189p.attribution {
190 text-align: right ;
191 margin-left: 50% }
192
193p.caption {
194 font-style: italic }
195
196p.credits {
197 font-style: italic ;
198 font-size: smaller }
199
200p.label {
201 white-space: nowrap }
202
203p.rubric {
204 font-weight: bold ;
205 font-size: larger ;
206 color: maroon ;
207 text-align: center }
208
209p.sidebar-title {
210 font-family: sans-serif ;
211 font-weight: bold ;
212 font-size: larger }
213
214p.sidebar-subtitle {
215 font-family: sans-serif ;
216 font-weight: bold }
217
218p.topic-title {
219 font-weight: bold }
220
221pre.address {
222 margin-bottom: 0 ;
223 margin-top: 0 ;
224 font-family: serif ;
225 font-size: 100% }
226
227pre.literal-block, pre.doctest-block {
228 margin-left: 2em ;
229 margin-right: 2em ;
230 background-color: #eeeeee }
231
232span.classifier {
233 font-family: sans-serif ;
234 font-style: oblique }
235
236span.classifier-delimiter {
237 font-family: sans-serif ;
238 font-weight: bold }
239
240span.interpreted {
241 font-family: sans-serif }
242
243span.option {
244 white-space: nowrap }
245
246span.pre {
247 white-space: pre }
248
249span.problematic {
250 color: red }
251
252span.section-subtitle {
253 /* font-size relative to parent (h1..h6 element) */
254 font-size: 80% }
255
256table.citation {
257 border-left: solid 1px gray;
258 margin-left: 1px }
259
260table.docinfo {
261 margin: 2em 4em }
262
263table.docutils {
264 margin-top: 0.5em ;
265 margin-bottom: 0.5em }
266
267table.footnote {
268 border-left: solid 1px black;
269 margin-left: 1px }
270
271table.docutils td, table.docutils th,
272table.docinfo td, table.docinfo th {
273 padding-left: 0.5em ;
274 padding-right: 0.5em ;
275 vertical-align: top }
276
277table.docutils th.field-name, table.docinfo th.docinfo-name {
278 font-weight: bold ;
279 text-align: left ;
280 white-space: nowrap ;
281 padding-left: 0 }
282
283h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
284h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
285 font-size: 100% }
286
287tt.docutils {
288 background-color: #eeeeee }
289
290ul.auto-toc {
291 list-style-type: none }
292
293</style>
8eda5e35
RD
294</head>
295<body>
296<div class="document" id="the-py-manual">
297<h1 class="title">The Py Manual</h1>
298<h2 class="subtitle" id="py-served-fresh-daily">Py - Served Fresh Daily</h2>
299<table class="docinfo" frame="void" rules="none">
300<col class="docinfo-name" />
301<col class="docinfo-content" />
302<tbody valign="top">
303<tr><th class="docinfo-name">Author:</th>
304<td>Patrick K. O'Brien</td></tr>
305<tr><th class="docinfo-name">Contact:</th>
306<td><a class="first last reference" href="mailto:pobrien&#64;orbtech.com">pobrien&#64;orbtech.com</a></td></tr>
307<tr><th class="docinfo-name">Organization:</th>
308<td><a class="first last reference" href="http://www.orbtech.com/">Orbtech</a></td></tr>
309<tr><th class="docinfo-name">Date:</th>
40efbdda 310<td>2004-04-15</td></tr>
8eda5e35 311<tr><th class="docinfo-name">Revision:</th>
40efbdda 312<td>1.5</td></tr>
8eda5e35
RD
313</tbody>
314</table>
974a50f1
RD
315<div class="contents topic">
316<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
8eda5e35 317<ul class="simple">
095315e2
RD
318<li><a class="reference" href="#introduction" id="id4" name="id4">Introduction</a></li>
319<li><a class="reference" href="#developer-reference" id="id5" name="id5">Developer Reference</a></li>
320<li><a class="reference" href="#what-is-py" id="id6" name="id6">What is Py?</a></li>
321<li><a class="reference" href="#pycrust-is-dead-long-live-py" id="id7" name="id7">PyCrust is dead! Long live Py!</a></li>
322<li><a class="reference" href="#py-standalone-programs" id="id8" name="id8">Py standalone programs</a></li>
323<li><a class="reference" href="#pyalacarte" id="id9" name="id9">PyAlaCarte</a></li>
324<li><a class="reference" href="#pyalamode" id="id10" name="id10">PyAlaMode</a></li>
325<li><a class="reference" href="#pycrust" id="id11" name="id11">PyCrust</a></li>
326<li><a class="reference" href="#pyfilling" id="id12" name="id12">PyFilling</a></li>
327<li><a class="reference" href="#pyshell" id="id13" name="id13">PyShell</a></li>
328<li><a class="reference" href="#pywrap" id="id14" name="id14">PyWrap</a></li>
329<li><a class="reference" href="#py-modules" id="id15" name="id15">Py modules</a></li>
330<li><a class="reference" href="#projects-using-py" id="id16" name="id16">Projects using Py</a></li>
331<li><a class="reference" href="#history-of-changes" id="id17" name="id17">History of changes</a><ul>
332<li><a class="reference" href="#id1" id="id18" name="id18">0.9.5 (12/23/2005)</a></li>
333<li><a class="reference" href="#to-2004" id="id19" name="id19">0.9.4 (1/25/2004 to //2004)</a></li>
334<li><a class="reference" href="#to-1-24-2004" id="id20" name="id20">0.9.3 (9/25/2003 to 1/24/2004)</a></li>
335<li><a class="reference" href="#to-9-25-2003" id="id21" name="id21">0.9.2 (5/3/2003 to 9/25/2003)</a></li>
336<li><a class="reference" href="#to-5-2-2003" id="id22" name="id22">0.9.1 (3/21/2003 to 5/2/2003)</a></li>
337<li><a class="reference" href="#to-3-20-2003" id="id23" name="id23">0.9 (2/27/2003 to 3/20/2003)</a></li>
338<li><a class="reference" href="#to-2-26-2003" id="id24" name="id24">0.8.2 (1/5/2003 to 2/26/2003)</a></li>
339<li><a class="reference" href="#to-12-25-2002" id="id25" name="id25">0.8.1 (12/20/2002 to 12/25/2002)</a></li>
340<li><a class="reference" href="#to-12-16-2002" id="id26" name="id26">0.8 (10/29/2002 to 12/16/2002)</a></li>
341<li><a class="reference" href="#to-8-27-2002" id="id27" name="id27">0.7.2 (2/22/2002 to 8/27/2002)</a></li>
342<li><a class="reference" href="#to-2-21-2002" id="id28" name="id28">0.7.1 (12/12/2001 to 2/21/2002)</a></li>
343<li><a class="reference" href="#to-12-11-2001" id="id29" name="id29">0.7 (10/15/2001 to 12/11/2001)</a></li>
344<li><a class="reference" href="#to-10-12-2001" id="id30" name="id30">0.6.1 (9/19/2001 to 10/12/2001)</a></li>
345<li><a class="reference" href="#to-9-12-2001" id="id31" name="id31">0.6 (8/21/2001 to 9/12/2001)</a></li>
346<li><a class="reference" href="#to-8-20-2001" id="id32" name="id32">0.5.4 (8/17/2001 to 8/20/2001)</a></li>
347<li><a class="reference" href="#id2" id="id33" name="id33">0.5.3 (8/16/2001)</a></li>
348<li><a class="reference" href="#to-8-15-2001" id="id34" name="id34">0.5.2 (8/14/2001 to 8/15/2001)</a></li>
349<li><a class="reference" href="#to-8-14-2001" id="id35" name="id35">0.5.1 (8/10/2001 to 8/14/2001)</a></li>
350<li><a class="reference" href="#id3" id="id36" name="id36">0.5 (8/8/2001)</a></li>
351<li><a class="reference" href="#to-8-7-2001" id="id37" name="id37">0.4 (8/4/2001 to 8/7/2001)</a></li>
352<li><a class="reference" href="#to-8-3-2001" id="id38" name="id38">0.3 (8/2/2001 to 8/3/2001)</a></li>
353<li><a class="reference" href="#to-8-2-2001" id="id39" name="id39">0.2 (7/30/2001 to 8/2/2001)</a></li>
354<li><a class="reference" href="#to-7-19-2001" id="id40" name="id40">0.1 (7/1/2001 to 7/19/2001)</a></li>
355<li><a class="reference" href="#in-the-beginning-there-was-pie-7-1-2001" id="id41" name="id41">In the beginning, there was pie... (7/1/2001)</a></li>
8eda5e35
RD
356</ul>
357</li>
358</ul>
359</div>
974a50f1
RD
360<div class="section">
361<h1><a class="toc-backref" href="#id4" id="introduction" name="introduction">Introduction</a></h1>
8eda5e35
RD
362<p>This document will show you how to use the Py programs and the Py
363library of Python source code modules. Py is the new name for the
364project that began as PyCrust. Py is officially part of <a class="reference" href="http://www.wxpython.org/">wxPython</a>,
365and includes PyCrust, so PyCrust is no longer distributed separately.</p>
366</div>
974a50f1
RD
367<div class="section">
368<h1><a class="toc-backref" href="#id5" id="developer-reference" name="developer-reference">Developer Reference</a></h1>
8eda5e35
RD
369<p>Source code documentation for developers is available at:</p>
370<p><a class="reference" href="http://www.orbtech.com/www/wx/epydoc/public/wx.py-module.html">http://www.orbtech.com/www/wx/epydoc/public/wx.py-module.html</a></p>
371</div>
974a50f1
RD
372<div class="section">
373<h1><a class="toc-backref" href="#id6" id="what-is-py" name="what-is-py">What is Py?</a></h1>
8eda5e35
RD
374<p>Besides being <a class="reference" href="http://www.wikipedia.org/wiki/Pie">a delicious dessert</a>, Py is the name for a collection
375of whimsically-named Python programs and modules that began as the
376PyCrust project. So Py is really several things: a set of standalone
377programs, including the original PyCrust program, a library of Python
40efbdda 378source code modules that can be used in your own programs, and as many
8eda5e35
RD
379examples of bad &quot;pie&quot; puns as I can come up with. (If you're going to
380do something, you might as well do it all the way, right?) Py uses
381Python and wxPython, so it works equally well on Windows, Linux and
382Mac OS X.</p>
383</div>
974a50f1
RD
384<div class="section">
385<h1><a class="toc-backref" href="#id7" id="pycrust-is-dead-long-live-py" name="pycrust-is-dead-long-live-py">PyCrust is dead! Long live Py!</a></h1>
8eda5e35
RD
386<p>This project began with a program I created called PyCrust - an
387interactive, graphical Python shell, developed using the wxPython GUI
388toolkit. For about two years, PyCrust was hosted on <a class="reference" href="http://www.sf.net/projects/pycrust/">SourceForge</a>.
389Shortly after I created PyCrust, the wxPython folks started including
390it in their distribution. As the PyCrust project grew, it reached a
391point where I thought the original PyCrust name was too confining. I
392was using the PyCrust code base to develop programs that weren't just
393Python shells any more.</p>
394<p>Around that same time, the wxPython folks asked me if I'd be willing
90805926
RD
395to move all my wxPython-related projects into the <a class="reference" href="http://cvs.wxWidgets.org">wxPython CVS
396repository</a>, and become part of the <a class="reference" href="http://www.wxpython.org/">wxPython</a>/<a class="reference" href="http://www.wxWidgets.org/">wxWidgets</a> developer team.
8eda5e35
RD
397I decided the time was right to restructure the PyCrust project.
398During the move, the PyCrust package was renamed to &quot;py&quot; (lowercase
399&quot;p&quot;) and the collection of programs and modules as a whole became
400known as &quot;Py&quot; (with a capital &quot;P&quot;).</p>
401<p>The original goal of PyCrust was to be the best interactive, graphical
402Python shell (of course, I claimed it was the &quot;flakiest&quot; Python
403shell). And that was all I wanted it to be. But little by little I
404found myself developing a wider variety of tools for wxPython
405applications. Eventually I'll create a debugger (PySlice, perhaps)
406and whatever else is needed to one day become a complete wxPython
407application development environment (PyFactory?). In the mean time,
408PyCrust is still the flakiest Python shell, and the other Py programs
409are equally tasty.</p>
410<p>At this point, Py has standalone programs that include Python code
411editors (PyAlaCarte and PyAlaMode), interactive Python shells (PyCrust
412and PyShell), and a runtime wrapper (PyWrap). The runtime wrapper
413utility provides you with runtime introspection capabilities for your
414wxPython programs without having to include PyCrust or PyShell in your
415program, and without having to alter one line of your source code.</p>
416<p>Py also contains a collection of modules that you can use in your own
417wxPython applications to provide similar services, either for your own
418use during development, or as an interface for users of your programs.
40efbdda 419These modules are the same ones used by all the Py programs.</p>
8eda5e35 420</div>
974a50f1
RD
421<div class="section">
422<h1><a class="toc-backref" href="#id8" id="py-standalone-programs" name="py-standalone-programs">Py standalone programs</a></h1>
8eda5e35
RD
423<p>These are the standalone applications in the Py collection:</p>
424<ul class="simple">
425<li>PyAlaCarte</li>
426<li>PyAlaMode</li>
427<li>PyCrust</li>
428<li>PyFilling</li>
429<li>PyShell</li>
430<li>PyWrap</li>
431</ul>
432</div>
974a50f1
RD
433<div class="section">
434<h1><a class="toc-backref" href="#id9" id="pyalacarte" name="pyalacarte">PyAlaCarte</a></h1>
8eda5e35
RD
435<p>PyAlaCarte is a Python source code editor. It is designed to have a
436simple, single-file interface. As a standalone application, it is
437good for simple, short editing tasks. But it is really meant to be
438more of an example of how to embed the Py editor into a wxPython
439application.</p>
440</div>
974a50f1
RD
441<div class="section">
442<h1><a class="toc-backref" href="#id10" id="pyalamode" name="pyalamode">PyAlaMode</a></h1>
8eda5e35
RD
443<p>PyAlaMode is a Python source code editor.</p>
444</div>
974a50f1
RD
445<div class="section">
446<h1><a class="toc-backref" href="#id11" id="pycrust" name="pycrust">PyCrust</a></h1>
8eda5e35
RD
447<p>PyCrust is an interactive, Python shell. But it's more than just a
448shell. It includes a tabbed notebook containing a namespace tree
449(PyFilling), and several other things.</p>
450</div>
974a50f1
RD
451<div class="section">
452<h1><a class="toc-backref" href="#id12" id="pyfilling" name="pyfilling">PyFilling</a></h1>
8eda5e35
RD
453<p>PyFilling is a namespace viewer. It isn't really useful as a
454standalone program, but it does illustrate how to make use of the
c66cd08a 455underlying <tt class="docutils literal"><span class="pre">filling</span></tt> module.</p>
8eda5e35 456</div>
974a50f1
RD
457<div class="section">
458<h1><a class="toc-backref" href="#id13" id="pyshell" name="pyshell">PyShell</a></h1>
8eda5e35
RD
459<p>PyShell is an interactive, Python shell. It shares the same base code
460as PyCrust, but doesn't have any of the extra features that appear in
461the PyCrust notebook interface.</p>
462<div class="figure">
974a50f1 463<img alt="screenshots/PyShell.png" src="screenshots/PyShell.png" />
90805926 464<p class="caption">PyShell running on Mandrake Linux.</p>
8eda5e35
RD
465</div>
466</div>
974a50f1
RD
467<div class="section">
468<h1><a class="toc-backref" href="#id14" id="pywrap" name="pywrap">PyWrap</a></h1>
8eda5e35
RD
469<p>PyWrap is a runtime utility that lets you run an existing wxPython
470program with a PyCrust frame at the same time. Inside the PyCrust
c66cd08a 471shell namespace, the local variable <tt class="docutils literal"><span class="pre">app</span></tt> is assigned to your
8eda5e35
RD
472application instance. In this way you can introspect your entire
473application within the PyCrust shell, as well as the PyFilling
40efbdda 474namespace viewer.</p>
8eda5e35 475</div>
974a50f1
RD
476<div class="section">
477<h1><a class="toc-backref" href="#id15" id="py-modules" name="py-modules">Py modules</a></h1>
8eda5e35
RD
478<p>Py was designed to be modular. That means graphical code is kept
479separate from non-graphical code, and many of the Py modules can be
480used by other programs. Likewise, other programs can supply some of
481the modules needed by Py. For example, you could supply a customized
482interpreter module and plug it in to the PyCrust standalone
483application. As long as it supports the minimum functionality
484required, PyCrust will work just as well with your interpreter as with
485its default interpreter.</p>
486</div>
974a50f1
RD
487<div class="section">
488<h1><a class="toc-backref" href="#id16" id="projects-using-py" name="projects-using-py">Projects using Py</a></h1>
8eda5e35
RD
489<ul class="simple">
490<li><a class="reference" href="http://conflictsolver.sourceforge.net/">Conflict Solver</a></li>
491<li><a class="reference" href="http://www.gnumed.org/">Gnumed</a></li>
492<li>PyGist</li>
493<li><a class="reference" href="http://www.pythoncard.org/">PythonCard</a></li>
494<li><a class="reference" href="http://rpy.sourceforge.net/">RPy</a></li>
495<li><a class="reference" href="http://www.scipy.org/">SciPy</a></li>
496<li><a class="reference" href="http://www.sim42.org/">Sim42</a></li>
497<li><a class="reference" href="http://linus.yorktown.arlington.k12.va.us/CS/APCSC/student_sites/David_Mayo/wxGasp">wxGasp</a></li>
498</ul>
499</div>
974a50f1
RD
500<div class="section">
501<h1><a class="toc-backref" href="#id17" id="history-of-changes" name="history-of-changes">History of changes</a></h1>
8eda5e35
RD
502<p>This section lists all the changes that have been made to the Py
503programs and modules, since the beginning.</p>
974a50f1
RD
504<div class="section">
505<h2><a class="toc-backref" href="#id18" id="id1" name="id1">0.9.5 (12/23/2005)</a></h2>
095315e2
RD
506<p>Applied a series of enhancments by Franz Steinaeusler, Adi Sieker, and
507Sebastian Haase, up until their 7-31-2005 version. (Their next
508version broke some existing functionality, and added some confusing
509hacks, and I didn't feel that the incremental gains were worth the
510loss at that point so I stopped at 7-31-2005.)</p>
511<p>Their changes include the following:</p>
512<ul class="simple">
513<li>The Autocomplete and Calltip windows can now be opened manually with
514Ctrl-Space and Ctrl-Shift-Space.</li>
515<li>In the stand alone PyCrust app the various option settings, window
516size and position, and etc. are saved and restored at the next run.</li>
517<li>Added a help dialog bound to the F1 key that shows the key bindings.</li>
518<li>Added a new text completion function that suggests words from the
519history. Bound to Shift-Return.</li>
520<li>F11 will toggle the maximized state of the frame.</li>
521<li>switched to Bind() from wx.EVT_*().</li>
522<li>Display of line numbers can be toggled.</li>
523<li>F12 toggles a &quot;free edit&quot; mode of the shell buffer. This mode is
524useful, for example, if you would like to remove some output or
525errors or etc. from the buffer before doing a copy/paste. The free
526edit mode is designated by the use of a red, non-flashing caret.</li>
486afba9 527<li>Ctrl-Shift-F will fold/unfold (hide/show) the selected lines.</li>
095315e2
RD
528</ul>
529<p>On top of these changes I (Robin Dunn) added the following:</p>
530<ul class="simple">
531<li>General code cleanup and fixes.</li>
532<li>Use wx.StandardPaths to determine the location of the config files.</li>
533<li>Remove Orbtech attributions from the UI, they've been there long
534enough.</li>
535<li>Use wx.SP_LIVE_UPDATE on crust and filling windows.</li>
536<li>Extended the saving of the config info and other new features to the
537PyShell app too. Additionally, other apps that embed a PyCrust or a
538PyShell can pass their own wx.Config object and have the Py code
539save/restore its settings to/from there.</li>
540<li>All of the classes with config info get an opportunity to save/load
541their own settings instead of putting all the save/load code in one
542place that then has to reach all over the place to do anything.</li>
543<li>Enable editing of the startup python code, which will either be the
544file pointed to by PYTHONSTARTUP or a file in the config dir if
545PYTHONSTARTUP is not set in the environment.</li>
974a50f1 546<li>Added an option to skip the running of the startup code when
095315e2
RD
547PyShell or PyCrust starts.</li>
548<li>PyCrust adds a pp(item) function to the shell's namespace that
549pretty prints the item in the Display tab of the notebook. Added
550code to raise that tab when pp() is called.</li>
551<li>Added an option for whether to insert text for function parameters
552when popping up the call tip.</li>
553<li>Added Find and Find-Next functions that use the wx.FindReplaceDialog.</li>
554</ul>
555</div>
974a50f1
RD
556<div class="section">
557<h2><a class="toc-backref" href="#id19" id="to-2004" name="to-2004">0.9.4 (1/25/2004 to //2004)</a></h2>
8eda5e35
RD
558<p>Removed wxd decorators in favor of new SWIG-generated docstrings.</p>
559<p>Removed docs tabs from crust interface:
560* wxPython Docs
561* wxSTC Docs</p>
9c329f86 562<p>Fixed Calltip tab refresh problem on Windows.</p>
90805926 563<p>shell.autoCompleteAutoHide added with default of False.</p>
9c329f86
RD
564<p>Changed default namespace of Shell to __main__.__dict__, instead of an
565empty dictionary.</p>
8eda5e35 566</div>
974a50f1
RD
567<div class="section">
568<h2><a class="toc-backref" href="#id20" id="to-1-24-2004" name="to-1-24-2004">0.9.3 (9/25/2003 to 1/24/2004)</a></h2>
8eda5e35
RD
569<p>Fun and games with dynamic renaming. Details of any other changes
570were lost in the confusion. I'll try to do better in the future.</p>
571</div>
974a50f1
RD
572<div class="section">
573<h2><a class="toc-backref" href="#id21" id="to-9-25-2003" name="to-9-25-2003">0.9.2 (5/3/2003 to 9/25/2003)</a></h2>
8eda5e35
RD
574<p>Changed to the new prefix-less &quot;wx&quot; package:</p>
575<pre class="literal-block">
576import wx
577</pre>
578<p>instead of:</p>
579<pre class="literal-block">
580from wxPython import wx
581</pre>
c66cd08a 582<p>Fixed typo in <tt class="docutils literal"><span class="pre">PyWrap.py</span></tt>:</p>
8eda5e35
RD
583<pre class="literal-block">
584if __name__ == '__main__':
585 main(sys.argv)
586</pre>
587<p>should have been:</p>
588<pre class="literal-block">
589if __name__ == '__main__':
590 main()
591</pre>
592<p>Added pretty-print Display tab to Crust, based on suggestion from
593Jason Whitlark.</p>
c66cd08a 594<p>Improved <tt class="docutils literal"><span class="pre">Can*</span></tt> checks in <tt class="docutils literal"><span class="pre">EditWindow</span></tt>, since STC is too lenient,
8eda5e35
RD
595particularly when it is set to read-only but returns True for
596CanPaste() (seems like an STC bug to me):</p>
597<pre class="literal-block">
598def CanCopy(self):
599 &quot;&quot;&quot;Return True if text is selected and can be copied.&quot;&quot;&quot;
600 return self.GetSelectionStart() != self.GetSelectionEnd()
601
602def CanCut(self):
603 &quot;&quot;&quot;Return True if text is selected and can be cut.&quot;&quot;&quot;
604 return self.CanCopy() and self.CanEdit()
605
606def CanEdit(self):
607 &quot;&quot;&quot;Return True if editing should succeed.&quot;&quot;&quot;
608 return not self.GetReadOnly()
609
610def CanPaste(self):
611 &quot;&quot;&quot;Return True if pasting should succeed.&quot;&quot;&quot;
612 return stc.StyledTextCtrl.CanPaste(self) and self.CanEdit()
613</pre>
614</div>
974a50f1
RD
615<div class="section">
616<h2><a class="toc-backref" href="#id22" id="to-5-2-2003" name="to-5-2-2003">0.9.1 (3/21/2003 to 5/2/2003)</a></h2>
8eda5e35
RD
617<p>PyCrust is dead! Long live Py!</p>
618<ul class="simple">
c66cd08a 619<li>Renamed <tt class="docutils literal"><span class="pre">PyCrust</span></tt> package to <tt class="docutils literal"><span class="pre">py</span></tt>.</li>
8eda5e35
RD
620<li>Moved code to wxPython's CVS repository.</li>
621</ul>
c66cd08a 622<p>Fixed bug in <tt class="docutils literal"><span class="pre">introspect.py</span></tt> on introspecting objects occurring
8eda5e35
RD
623immediately after a secondary prompt, like this:</p>
624<pre class="literal-block">
625&gt;&gt;&gt; l = [1, 2, 3]
626&gt;&gt;&gt; for n in range(3):
627... l. &lt;-- failed to popup autocomplete list
628</pre>
629<p>Added documentation files:</p>
630<ul class="simple">
631<li>PyManual.txt</li>
632<li>wxPythonManual.txt</li>
633<li>wxPythonPackage.txt</li>
634<li>wxPythonExamples.txt</li>
635</ul>
636<p>Added PyAlaMode and PyAlaCarte code editors.</p>
c66cd08a 637<p>Major refactoring to support <tt class="docutils literal"><span class="pre">editor</span></tt> and <tt class="docutils literal"><span class="pre">shell</span></tt> from the same
8eda5e35
RD
638base.</p>
639<p>Renamed program files:</p>
640<ul class="simple">
c66cd08a
RD
641<li><tt class="docutils literal"><span class="pre">PyCrustApp.py</span></tt> to <tt class="docutils literal"><span class="pre">PyCrust.py</span></tt></li>
642<li><tt class="docutils literal"><span class="pre">PyFillingApp.py</span></tt> to <tt class="docutils literal"><span class="pre">PyFilling.py</span></tt></li>
643<li><tt class="docutils literal"><span class="pre">PyShellApp.py</span></tt> to <tt class="docutils literal"><span class="pre">PyShell.py</span></tt></li>
644<li><tt class="docutils literal"><span class="pre">wrap.py</span></tt> to <tt class="docutils literal"><span class="pre">PyWrap.py</span></tt></li>
8eda5e35
RD
645</ul>
646<p>Removed disabling of autocomplete for lists of 2000 items or more.
647The current implementation of wxSTC can now handle lists this big.</p>
c66cd08a 648<p>Improved handling of <tt class="docutils literal"><span class="pre">sys.path</span></tt> to mimic the standard Python shell.</p>
8eda5e35 649</div>
974a50f1
RD
650<div class="section">
651<h2><a class="toc-backref" href="#id23" id="to-3-20-2003" name="to-3-20-2003">0.9 (2/27/2003 to 3/20/2003)</a></h2>
8eda5e35
RD
652<p>Added fontIncrease, fontDecrease, fontDefault signals, receivers and
653keybindings:</p>
654<pre class="literal-block">
655Ctrl+] Increase font size.
656Ctrl+[ Decrease font size.
657Ctrl+= Default font size.
658</pre>
659<p>Continued enhancement of the decorator capability to provide better
660documentation and docstrings for wxPython classes and functions.</p>
661<p>Introduced new tabbed interface:</p>
662<ul class="simple">
663<li>Namespace</li>
664<li>Calltip</li>
665<li>Session</li>
666<li>Dispatcher</li>
667<li>wxPython Docs</li>
668<li>wxSTC Docs</li>
669</ul>
c66cd08a 670<p><tt class="docutils literal"><span class="pre">Filling.tree</span></tt> now expands tuples as well as lists. (It should have
8eda5e35
RD
671done this all along, I just never noticed this omission before.)</p>
672<p>Added this True/False test to all modules:</p>
673<pre class="literal-block">
674try:
675 True
676except NameError:
677 True = 1==1
678 False = 1==0
679</pre>
c66cd08a 680<p>Added <tt class="docutils literal"><span class="pre">wxd</span></tt> directory with decoration classes.</p>
8eda5e35 681</div>
974a50f1
RD
682<div class="section">
683<h2><a class="toc-backref" href="#id24" id="to-2-26-2003" name="to-2-26-2003">0.8.2 (1/5/2003 to 2/26/2003)</a></h2>
c66cd08a 684<p>Wrapped <tt class="docutils literal"><span class="pre">sys.ps1</span></tt>, <tt class="docutils literal"><span class="pre">sys.ps2</span></tt>, and <tt class="docutils literal"><span class="pre">sys.ps3</span></tt> in <tt class="docutils literal"><span class="pre">str()</span></tt>.
8eda5e35
RD
685(Thanks, Kieran Holland.)</p>
686<p>Fixed minor things found by PyChecker.</p>
c66cd08a 687<p>Changed locals to use <tt class="docutils literal"><span class="pre">__main__.__dict__</span></tt> and added code to clean up
8eda5e35
RD
688the namespace, making it as close to the regular Python environment as
689possible. This solves the problem of pickling and unpickling
690instances of classes defined in the shell.</p>
c66cd08a 691<p>Made <tt class="docutils literal"><span class="pre">shell.PasteAndRun()</span></tt> a little more forgiving when it finds a
8eda5e35
RD
692ps2 prompt line with no trailing space, such when you copy code from a
693web page.</p>
694<p>Improved autocomplete behavior by adding these to shell:</p>
695<pre class="literal-block">
696self.AutoCompSetAutoHide(False)
697self.AutoCompStops(' .,;:([)]}\'&quot;\\&lt;&gt;%^&amp;+-=*/|`')
698</pre>
c66cd08a
RD
699<p>Added <tt class="docutils literal"><span class="pre">decor</span></tt> directory, <tt class="docutils literal"><span class="pre">decorator.py</span></tt>, <tt class="docutils literal"><span class="pre">stcDecor.py</span></tt>, and
700<tt class="docutils literal"><span class="pre">stcConstants.py</span></tt>. These all serve the purpose of adding docstrings
701to existing wxPython classes, in particular the <tt class="docutils literal"><span class="pre">wxStyledTextCtrl</span></tt>.</p>
702<p>Added <tt class="docutils literal"><span class="pre">wrap.py</span></tt>, a command line utility for running a wxPython app
8eda5e35
RD
703with additional runtime-tools loaded, such as PyCrust (the only tool
704at this point).</p>
705<p>Flushed the clipboard Cut/Copy operations so that selections will
706exist in the clipboard even after PyCrust has been closed.</p>
707<p>Improved the suppression of docstrings for simple data types appearing
708in the namespace viewer.</p>
709<p>Better handling of autocompletion with numeric types; no
710autocompletion when typing a dot after an integer. If the
711autocompletion is desired, type a space before the dot:</p>
712<pre class="literal-block">
713func = 3 .
714</pre>
715<p>More Filling!!! The namespace tree is now dynamically updated.</p>
716</div>
974a50f1
RD
717<div class="section">
718<h2><a class="toc-backref" href="#id25" id="to-12-25-2002" name="to-12-25-2002">0.8.1 (12/20/2002 to 12/25/2002)</a></h2>
8eda5e35
RD
719<p>Improved keyboard handling with Autocomplete active. You can now use
720Enter as well as Tab to select an item from the list.</p>
721<p>Disabled autocomplete for lists of 2000 items or more. The current
722implementation of wxSTC can't handle lists this big.</p>
c66cd08a 723<p>Changed <tt class="docutils literal"><span class="pre">filling</span></tt> to always display docstrings for objects. This is
8eda5e35
RD
724useful for objects whose docstrings have been decorated, rather than
725coming directly from the source code. (Hmmm. Sounds like someone is
726doing some decorating. I wonder where that would be helpful? &lt;wink&gt;)</p>
c66cd08a 727<p>Fixed handling of icon. Added <tt class="docutils literal"><span class="pre">images.py</span></tt> file.</p>
8eda5e35 728</div>
974a50f1
RD
729<div class="section">
730<h2><a class="toc-backref" href="#id26" id="to-12-16-2002" name="to-12-16-2002">0.8 (10/29/2002 to 12/16/2002)</a></h2>
8eda5e35 731<p>Added &quot;help&quot; to startup banner info.</p>
c66cd08a
RD
732<p>Made all <tt class="docutils literal"><span class="pre">wx</span></tt> and <tt class="docutils literal"><span class="pre">stc</span></tt> imports explicit. No more <tt class="docutils literal"><span class="pre">import</span> <span class="pre">*</span></tt>.</p>
733<p>Replaced use of the <tt class="docutils literal"><span class="pre">wx</span></tt> module's <tt class="docutils literal"><span class="pre">true</span></tt> and <tt class="docutils literal"><span class="pre">false</span></tt> with
734Python's <tt class="docutils literal"><span class="pre">True</span></tt> and <tt class="docutils literal"><span class="pre">False</span></tt>.</p>
735<p>Changed <tt class="docutils literal"><span class="pre">introspect.getRoot()</span></tt> to use <tt class="docutils literal"><span class="pre">tokenize</span></tt> module. This
8eda5e35
RD
736does a slightly better job than the previous parsing routine and the
737code is clearer.</p>
738<p>Improved handling of whitespace and empty types during introspection.</p>
739<p>Fixed cut/copy clipboard problem under Linux. (Robin Dunn rocks!!!)</p>
740<p>Added shell.about() which works like this:</p>
741<pre class="literal-block">
742&gt;&gt;&gt; shell.about()
743PyCrust Version: 0.8
744Shell Revision: 1.80
745Interpreter Revision: 1.15
746Python Version: 2.2.2
747wxPython Version: 2.3.3.1
748Platform: linux2
749</pre>
750<p>Added copy plus and paste plus to shell menu.</p>
c66cd08a
RD
751<p>Moved shell menu from <tt class="docutils literal"><span class="pre">shell.py</span></tt> to <tt class="docutils literal"><span class="pre">shellmenu.py</span></tt>.</p>
752<p>Added <tt class="docutils literal"><span class="pre">sys.stdin.readlines()</span></tt> support.</p>
753<p>Added <tt class="docutils literal"><span class="pre">time.sleep()</span></tt> in <tt class="docutils literal"><span class="pre">readline()</span></tt> and <tt class="docutils literal"><span class="pre">OnIdle()</span></tt> event
8eda5e35
RD
754handler to free up the CPU.</p>
755</div>
974a50f1
RD
756<div class="section">
757<h2><a class="toc-backref" href="#id27" id="to-8-27-2002" name="to-8-27-2002">0.7.2 (2/22/2002 to 8/27/2002)</a></h2>
c66cd08a 758<p>Tweaked <tt class="docutils literal"><span class="pre">getAttributeNames()</span></tt> to pick up a few more attributes:</p>
8eda5e35
RD
759<pre class="literal-block">
760'__bases__', '__class__', '__dict__', '__name__', 'func_closure',
761'func_code', 'func_defaults', 'func_dict', 'func_doc',
762'func_globals', 'func_name'
763</pre>
764<p>Added a tests directory and unit tests.</p>
c66cd08a
RD
765<p>Improved support for empty types in the shell: <tt class="docutils literal"><span class="pre">[]</span></tt>, <tt class="docutils literal"><span class="pre">()</span></tt> and
766<tt class="docutils literal"><span class="pre">{}</span></tt> as far as when call tips and autocompletion are available.</p>
767<p>Added support for the other triple string - <tt class="docutils literal"><span class="pre">''''''</span></tt>.</p>
768<p>Refactored <tt class="docutils literal"><span class="pre">introspect.py</span></tt> to improve testability.</p>
8eda5e35
RD
769<p>Improved call tips for unbound methods by leaving the &quot;self&quot;
770parameter, since unbound methods require an instance be passed.</p>
771<p>Fixed call tip bug where a tip was displayed when a &quot;(&quot; was typed
772after an object that wasn't callable.</p>
c66cd08a 773<p>Fixed <tt class="docutils literal"><span class="pre">getAllAttributeNames</span></tt> when <tt class="docutils literal"><span class="pre">str(object)</span></tt> fails.</p>
8eda5e35 774<p>Added brace highlighting. (Thank you, Kevin Altis.)</p>
c66cd08a
RD
775<p>Fixed problem displaying unicode objects in <tt class="docutils literal"><span class="pre">PyFilling</span></tt>.</p>
776<p>Changed how <tt class="docutils literal"><span class="pre">filling.py</span></tt> checks for expandable objects. Lists are
8eda5e35
RD
777now expandable objects.</p>
778<p>Made the key handling more robust when there is an active text
779selection that includes text prior to the last primary prompt. Thanks
780to Raul Cota for pointing this out.</p>
781<p>Fixed wxSTC problem with brace highlighting and non-us keyboards.
782(Thank you for the patch, Jean-Michel Fauth.)</p>
c66cd08a
RD
783<p>Added <tt class="docutils literal"><span class="pre">busy</span> <span class="pre">=</span> <span class="pre">wxBusyCursor()</span></tt> to key points in <tt class="docutils literal"><span class="pre">shell</span></tt> and
784<tt class="docutils literal"><span class="pre">filling</span></tt>.</p>
785<p>Added <tt class="docutils literal"><span class="pre">OnCloseWindow</span></tt> handler to <tt class="docutils literal"><span class="pre">ShellFrame</span></tt> and <tt class="docutils literal"><span class="pre">CrustFrame</span></tt>.</p>
786<p>Default to <tt class="docutils literal"><span class="pre">SetWrapMode(1)</span></tt> for shell and namespace viewer.</p>
787<p>Added <tt class="docutils literal"><span class="pre">shell.wrap()</span></tt> and <tt class="docutils literal"><span class="pre">shell.zoom()</span></tt>.</p>
8eda5e35
RD
788<p>Added autoCompleteKeys hooks for Raul Cota.</p>
789<p>Cleaned up various little key handling bugs.</p>
790<p>Changed input methods to get values from shell, rather than dialog
c66cd08a
RD
791boxes. Renamed <tt class="docutils literal"><span class="pre">readIn</span></tt> to <tt class="docutils literal"><span class="pre">readline</span></tt> and <tt class="docutils literal"><span class="pre">readRaw</span></tt> to
792<tt class="docutils literal"><span class="pre">raw_input</span></tt>.</p>
8eda5e35 793</div>
974a50f1
RD
794<div class="section">
795<h2><a class="toc-backref" href="#id28" id="to-2-21-2002" name="to-2-21-2002">0.7.1 (12/12/2001 to 2/21/2002)</a></h2>
c66cd08a 796<p>Fixed <tt class="docutils literal"><span class="pre">OnChar()</span></tt> issues effecting European keyboards, as reported by
8eda5e35 797Jean-Michel Fauth.</p>
c66cd08a 798<p>Fixed <tt class="docutils literal"><span class="pre">introspect.py</span></tt> issue with xmlrpc objects reported by Kevin
8eda5e35
RD
799Altis.</p>
800<p>Fixed some introspect/PyFilling issues with regard to Python 2.2.</p>
801<p>Fixed font background color as reported by Keith J. Farmer. (Thanks)</p>
802<p>Fixed problem with call tips and autocompletion inside multiline
803commands as report by Kevin Altis.</p>
c66cd08a 804<p>Improved <tt class="docutils literal"><span class="pre">OnKeyDown</span></tt> handling of cut/copy/paste operations based on
8eda5e35 805feedback from Syver Enstad. (Thanks)</p>
c66cd08a 806<p>Added a <tt class="docutils literal"><span class="pre">shell.help()</span></tt> method to display some help info.</p>
8eda5e35 807<p>Changed sort of items in the namespace viewer to case insensitive.</p>
c66cd08a 808<p>Changed <tt class="docutils literal"><span class="pre">attributes.sort(lambda</span> <span class="pre">x,</span> <span class="pre">y:</span> <span class="pre">cmp(x.upper(),</span> <span class="pre">y.upper()))</span></tt> in
8eda5e35
RD
809advance of an upcoming fix to an autocompletion matching bug in wxSTC.</p>
810<p>Improved support for ZODB by allowing namespace drilldown into BTrees.</p>
c66cd08a 811<p>Added <tt class="docutils literal"><span class="pre">shell.PasteAndRun()</span></tt> to support pasting multiple commands into
8eda5e35
RD
812the shell from the clipboard. Ctrl+Shift+V or v.</p>
813<p>Enter now always processes a command (or copies down a previous one.)
814To insert a line break, press Ctrl+Enter.</p>
815<p>Escape key clears the current, unexecuted command.</p>
816<p>History retrieval changed to replace current command. Added new keys
817to insert from history - Shift+Up and Shift+Down.</p>
c66cd08a 818<p>Better call tips on objects with <tt class="docutils literal"><span class="pre">__call__</span></tt> methods.</p>
8eda5e35
RD
819<p>Improved call tip positioning calculation.</p>
820</div>
974a50f1
RD
821<div class="section">
822<h2><a class="toc-backref" href="#id29" id="to-12-11-2001" name="to-12-11-2001">0.7 (10/15/2001 to 12/11/2001)</a></h2>
8eda5e35
RD
823<p>Changed how command history retrieval functions work. Added Alt-P,
824Alt-N as keybindings for Retrieve-Previous, Retrieve-Next.</p>
825<p>Added full support for multi-line commands, similar to IDLE.</p>
c66cd08a 826<p>Changed <tt class="docutils literal"><span class="pre">introspect.getAttributeNames()</span></tt> to do a case insensitive
8eda5e35
RD
827sort.</p>
828<p>Changed Cut/Copy/Paste to deal with prompts intelligently. Cut and
829Copy remove all prompts. Paste can handle prompted or not-prompted
830text.</p>
c66cd08a 831<p>Added <tt class="docutils literal"><span class="pre">CopyWithPrompts()</span></tt> method attached to Ctrl-Shift-C for those
8eda5e35
RD
832times when you really do want all the prompts left intact.</p>
833<p>Improved handling of the shell's read-only zone.</p>
c66cd08a
RD
834<p>Changed <tt class="docutils literal"><span class="pre">CrustFrame.__init__</span></tt> parameter spec to include all
835parameters allowed by a <tt class="docutils literal"><span class="pre">wxFrame</span></tt>.</p>
836<p>Changed <tt class="docutils literal"><span class="pre">FillingText</span></tt> to be read-only.</p>
837<p>Renamed <tt class="docutils literal"><span class="pre">PyCrust.py</span></tt> to <tt class="docutils literal"><span class="pre">PyCrustApp.py</span></tt> to eliminate
838package/module name conflicts that kept you from doing <tt class="docutils literal"><span class="pre">from</span> <span class="pre">PyCrust</span>
839<span class="pre">import</span> <span class="pre">shell</span></tt> inside files located in the <tt class="docutils literal"><span class="pre">PyCrust</span></tt> directory.</p>
840<p>Renamed <tt class="docutils literal"><span class="pre">PyFilling.py</span></tt> to <tt class="docutils literal"><span class="pre">PyFillingApp.py</span></tt> and <tt class="docutils literal"><span class="pre">PyShell.py</span></tt> to
841<tt class="docutils literal"><span class="pre">PyShellApp.py</span></tt> to maintain consistency.</p>
842<p>Removed the <tt class="docutils literal"><span class="pre">__date__</span></tt> property from all modules.</p>
843<p>Fixed bug in <tt class="docutils literal"><span class="pre">introspect.getCallTip()</span></tt>, reported by Kevin Altis.</p>
8eda5e35 844</div>
974a50f1
RD
845<div class="section">
846<h2><a class="toc-backref" href="#id30" id="to-10-12-2001" name="to-10-12-2001">0.6.1 (9/19/2001 to 10/12/2001)</a></h2>
c66cd08a 847<p>Changed <tt class="docutils literal"><span class="pre">Shell.run()</span></tt> to always position to the end of existing
8eda5e35 848text, as suggested by Raul Cota.</p>
c66cd08a
RD
849<p>Changed <tt class="docutils literal"><span class="pre">introspect.getAllAttributeNames()</span></tt> to break circular
850references in <tt class="docutils literal"><span class="pre">object.__class__</span></tt>, which occurs in Zope/ZODB
8eda5e35 851extension classes.</p>
c66cd08a 852<p>Changed <tt class="docutils literal"><span class="pre">filling.FillingTree.getChildren()</span></tt> to introspect extension
8eda5e35 853classes.</p>
c66cd08a 854<p>Fixed minor bugs in <tt class="docutils literal"><span class="pre">introspect.getCallTip()</span></tt> that were interfering
8eda5e35
RD
855with call tips for Zope/ZODB extension class methods.</p>
856<p>In preparation for wxPython 2.3.2, added code to fix a font sizing
857problem. Versions of wxPython prior to 2.3.2 had a sizing bug on Win
858platform where the font was 2 points larger than what was specified.</p>
c66cd08a 859<p>Added a hack to <tt class="docutils literal"><span class="pre">introspect.getAllAttributeNames()</span></tt> to &quot;wake up&quot;
8eda5e35
RD
860ZODB objects that are asleep - in a &quot;ghost&quot; state. Otherwise it
861returns incomplete info.</p>
862</div>
974a50f1
RD
863<div class="section">
864<h2><a class="toc-backref" href="#id31" id="to-9-12-2001" name="to-9-12-2001">0.6 (8/21/2001 to 9/12/2001)</a></h2>
c66cd08a
RD
865<p>Added <tt class="docutils literal"><span class="pre">PyFilling.py</span></tt> and <tt class="docutils literal"><span class="pre">filling.py</span></tt>.</p>
866<p><tt class="docutils literal"><span class="pre">PyShell.py</span></tt> and <tt class="docutils literal"><span class="pre">PyFilling.py</span></tt> can now be run standalone, as well
867as <tt class="docutils literal"><span class="pre">PyCrust.py</span></tt>.</p>
868<p>Added <tt class="docutils literal"><span class="pre">crust.py</span></tt> and moved some code from <tt class="docutils literal"><span class="pre">PyCrust.py</span></tt> to it.</p>
8eda5e35 869<p>Added command history retrieval features submitted by Richie Hindle.</p>
c66cd08a
RD
870<p>Changed <tt class="docutils literal"><span class="pre">shell.write()</span></tt> to replace line endings with OS-specific
871endings. Changed <tt class="docutils literal"><span class="pre">shell.py</span></tt> and <tt class="docutils literal"><span class="pre">interpreter.py</span></tt> to use
872<tt class="docutils literal"><span class="pre">os.linesep</span></tt> in strings having hardcoded line endings.</p>
873<p>Added <tt class="docutils literal"><span class="pre">shell.redirectStdin()</span></tt>, <tt class="docutils literal"><span class="pre">shell.redirectStdout()</span></tt> and
874<tt class="docutils literal"><span class="pre">shell.redirectStderr()</span></tt> to allow the surrounding app to toggle
875requests that the specified <tt class="docutils literal"><span class="pre">sys.std*</span></tt> be redirected to the shell.
8eda5e35
RD
876These can also be run from within the shell itself, of course.</p>
877<p>The shell now adds the current working directory &quot;.&quot; to the search
878path:</p>
879<pre class="literal-block">
880sys.path.insert(0, os.curdir)
881</pre>
882<p>Added support for distutils installations.</p>
883</div>
974a50f1
RD
884<div class="section">
885<h2><a class="toc-backref" href="#id32" id="to-8-20-2001" name="to-8-20-2001">0.5.4 (8/17/2001 to 8/20/2001)</a></h2>
8eda5e35
RD
886<p>Changed default font size under Linux to:</p>
887<pre class="literal-block">
888'size' : 12,
889'lnsize' : 10,
890</pre>
c66cd08a 891<p>Changed <tt class="docutils literal"><span class="pre">Shell</span></tt> to expect a parameter referencing an Interpreter
8eda5e35
RD
892class, rather than an intepreter instance, to facilitate subclassing
893of Interpreter, which effectively broke when the Editor class was
894eliminated.</p>
c66cd08a 895<p>Fixed <tt class="docutils literal"><span class="pre">PyCrustAlaCarte.py</span></tt>, which had been broken by previous
8eda5e35 896changes.</p>
c66cd08a 897<p>Created <tt class="docutils literal"><span class="pre">InterpreterAlaCarte</span></tt> class as an example for use in the
8eda5e35 898demo.</p>
c66cd08a
RD
899<p>Split <tt class="docutils literal"><span class="pre">PyCrust.py</span></tt> into <tt class="docutils literal"><span class="pre">PyCrust.py</span></tt> and <tt class="docutils literal"><span class="pre">PyShell.py</span></tt> in
900anticipation of <tt class="docutils literal"><span class="pre">PyFilling.py</span></tt>.</p>
8eda5e35 901</div>
974a50f1
RD
902<div class="section">
903<h2><a class="toc-backref" href="#id33" id="id2" name="id2">0.5.3 (8/16/2001)</a></h2>
c66cd08a 904<p>Added patch to <tt class="docutils literal"><span class="pre">PyCrust.py</span></tt> to fix wxPython bug:</p>
8eda5e35
RD
905<pre class="literal-block">
906wxID_SELECTALL = NewId() # This *should* be defined by wxPython.
907</pre>
908</div>
974a50f1
RD
909<div class="section">
910<h2><a class="toc-backref" href="#id34" id="to-8-15-2001" name="to-8-15-2001">0.5.2 (8/14/2001 to 8/15/2001)</a></h2>
8eda5e35 911<p>Shortened module names by dropping &quot;PyCrust&quot; as a prefix.</p>
c66cd08a 912<p>Changed <tt class="docutils literal"><span class="pre">version</span></tt> to <tt class="docutils literal"><span class="pre">VERSION</span></tt> in <tt class="docutils literal"><span class="pre">version</span></tt> module.</p>
8eda5e35
RD
913<p>Added Options menu to PyCrust application.</p>
914<p>Eliminated the Editor class (and editor module) by merging with Shell.
915This means that Shell &quot;is a&quot; wxStyledTextCtrl rather than &quot;has a&quot;.
916There just wasn't enough non-gui code to justify the separation.
917Plus, Shell will be much easier for gui toolkits/designers to deal
918with now.</p>
919</div>
974a50f1
RD
920<div class="section">
921<h2><a class="toc-backref" href="#id35" id="to-8-14-2001" name="to-8-14-2001">0.5.1 (8/10/2001 to 8/14/2001)</a></h2>
c66cd08a
RD
922<p>Added <tt class="docutils literal"><span class="pre">introspect</span></tt> module.</p>
923<p>Moved some functionality from <tt class="docutils literal"><span class="pre">PyCrustInterp</span></tt> to <tt class="docutils literal"><span class="pre">introspect</span></tt>.</p>
924<p>Changed <tt class="docutils literal"><span class="pre">introspect.getRoot()</span></tt> to no longer remove whitespace from
8eda5e35
RD
925the command. This was a remnant of a previous approach that, when
926left as part of the current approach, turned out to be a really bad
927thing.</p>
c66cd08a
RD
928<p>Changed <tt class="docutils literal"><span class="pre">introspect.getRoot()</span></tt> to allow commands of <tt class="docutils literal"><span class="pre">''</span></tt>, <tt class="docutils literal"><span class="pre">&quot;&quot;</span></tt>,
929<tt class="docutils literal"><span class="pre">&quot;&quot;&quot;&quot;&quot;&quot;</span></tt>, <tt class="docutils literal"><span class="pre">[]</span></tt>, <tt class="docutils literal"><span class="pre">()</span></tt>, and <tt class="docutils literal"><span class="pre">{}</span></tt> to pass through. This allows
8eda5e35
RD
930you to type them, followed by a dot, and get autocomplete options on
931them.</p>
c66cd08a 932<p>Changed <tt class="docutils literal"><span class="pre">introspect.getRoot()</span></tt> to identify some situations where
8eda5e35
RD
933strings shouldn't be considered roots. For example:</p>
934<pre class="literal-block">
935&gt;&gt;&gt; import PyCrust # To illustrate the potential problem.
936&gt;&gt;&gt; len('PyCrust.py')
937</pre>
938<p>Typing the dot at the end of &quot;PyCrust&quot; in the second line above should
939NOT result in an autocompletion list because &quot;PyCrust&quot; is part of a
940string in this context, not a reference to the PyCrust module object.
941Similar reasoning applies to call tips. For example:</p>
942<pre class="literal-block">
943&gt;&gt;&gt; len('dir(')
944</pre>
945<p>Typing the left paren at the end of &quot;dir&quot; should NOT result in a call
946tip.</p>
947<p>Both features now behave properly in the examples given. However,
948there is still the case where whitespace precedes the potential root
949and that is NOT handled properly. For example:</p>
950<pre class="literal-block">
951&gt;&gt;&gt; len('this is a dir(')
952</pre>
953<p>and:</p>
954<pre class="literal-block">
955&gt;&gt;&gt; len('This is PyCrust.py')
956</pre>
957<p>More code needs to be written to handle more complex situations.</p>
c66cd08a 958<p>Added <tt class="docutils literal"><span class="pre">locals=None</span></tt> parameter to <tt class="docutils literal"><span class="pre">Shell.__init__()</span></tt>.</p>
8eda5e35
RD
959<p>Added support for magic attribute retrieval. Users can change this
960with:</p>
961<pre class="literal-block">
962&gt;&gt;&gt; shell.editor.autoCompleteIncludeMagic = 0
963</pre>
964<p>Added the ability to set filters on auto completion to exclude
965attributes prefixed with a single or double underscore. Users can
966exclude one or the other or both with:</p>
967<pre class="literal-block">
968&gt;&gt;&gt; shell.editor.autoCompleteExcludeSingle = 1
969&gt;&gt;&gt; shell.editor.autoCompleteExcludeDouble = 1
970</pre>
971</div>
974a50f1
RD
972<div class="section">
973<h2><a class="toc-backref" href="#id36" id="id3" name="id3">0.5 (8/8/2001)</a></h2>
8eda5e35
RD
974<p>Mostly just a final version change before creating a release.</p>
975</div>
974a50f1
RD
976<div class="section">
977<h2><a class="toc-backref" href="#id37" id="to-8-7-2001" name="to-8-7-2001">0.4 (8/4/2001 to 8/7/2001)</a></h2>
8eda5e35
RD
978<p>Changed version/revision handling.</p>
979<p>Fixed bugs.</p>
980</div>
974a50f1
RD
981<div class="section">
982<h2><a class="toc-backref" href="#id38" id="to-8-3-2001" name="to-8-3-2001">0.3 (8/2/2001 to 8/3/2001)</a></h2>
8eda5e35
RD
983<p>Removed lots of cruft.</p>
984<p>Added lots of docstrings.</p>
985<p>Imported to CVS repository at SourceForge.</p>
986<p>Added call tips.</p>
987</div>
974a50f1
RD
988<div class="section">
989<h2><a class="toc-backref" href="#id39" id="to-8-2-2001" name="to-8-2-2001">0.2 (7/30/2001 to 8/2/2001)</a></h2>
8eda5e35
RD
990<p>Renamed several files.</p>
991<p>Added command autocompletion.</p>
992<p>Added menus to PyCrust.py: File, Edit and Help.</p>
c66cd08a
RD
993<p>Added sample applications: <tt class="docutils literal"><span class="pre">PyCrustAlaCarte.py</span></tt>,
994<tt class="docutils literal"><span class="pre">PyCrustAlaMode.py</span></tt>, and <tt class="docutils literal"><span class="pre">PyCrustMinimus.py</span></tt>.</p>
8eda5e35 995</div>
974a50f1
RD
996<div class="section">
997<h2><a class="toc-backref" href="#id40" id="to-7-19-2001" name="to-7-19-2001">0.1 (7/1/2001 to 7/19/2001)</a></h2>
8eda5e35
RD
998<p>Added basic syntax coloring much like Boa.</p>
999<p>Added read-only logging much like IDLE.</p>
1000<p>Can retrieve a previous command by putting the cursor back on that
1001line and hitting enter.</p>
c66cd08a
RD
1002<p>Stdin and raw_input operate properly so you can now do <tt class="docutils literal"><span class="pre">help()</span></tt> and
1003<tt class="docutils literal"><span class="pre">license()</span></tt> without hanging.</p>
8eda5e35
RD
1004<p>Redefined &quot;quit&quot;, &quot;exit&quot;, and &quot;close&quot; to display a better-than-nothing
1005response.</p>
1006<p>Home key honors the prompt.</p>
1007<p>Created SourceForge account, but nothing was posted.</p>
1008</div>
974a50f1
RD
1009<div class="section">
1010<h2><a class="toc-backref" href="#id41" id="in-the-beginning-there-was-pie-7-1-2001" name="in-the-beginning-there-was-pie-7-1-2001">In the beginning, there was pie... (7/1/2001)</a></h2>
8eda5e35
RD
1011<p>Blame it all on IDLE, Boa and PythonWin. I was using all three, got
1012frustrated with their dissimilarities, and began to let everyone know
1013how I felt. At the same time, Scintilla looked like an interesting
1014tool to build a shell around. And while I didn't receive much in the
1015way of positive feedback, let alone encouragement, I just couldn't let
1016go of the idea of a Scintilla-based Python shell. Then the PythonCard
1017project got to the point where they were talking about including a
1018shell in their development environment. That was all the incentive I
1019needed. PyCrust had to happen...</p>
1020</div>
1021</div>
1022</div>
8eda5e35
RD
1023</body>
1024</html>