to move all my wxPython-related projects into the <aclass="reference"href="http://cvs.wxWidgets.org">wxPython CVS
repository</a>, and become part of the <aclass="reference"href="http://www.wxpython.org/">wxPython</a>/<aclass="reference"href="http://www.wxWidgets.org/">wxWidgets</a> developer team.
<p>Changed to the new prefix-less "wx" package:</p>
<preclass="literal-block">
import wx
</pre>
<p>instead of:</p>
<preclass="literal-block">
from wxPython import wx
</pre>
<p>Fixed typo in <ttclass="literal"><spanclass="pre">PyWrap.py</span></tt>:</p>
<preclass="literal-block">
if __name__ == '__main__':
main(sys.argv)
</pre>
<p>should have been:</p>
<preclass="literal-block">
if __name__ == '__main__':
main()
</pre>
<p>Added pretty-print Display tab to Crust, based on suggestion from
Jason Whitlark.</p>
<p>Improved <ttclass="literal"><spanclass="pre">Can*</span></tt> checks in <ttclass="literal"><spanclass="pre">EditWindow</span></tt>, since STC is too lenient,
particularly when it is set to read-only but returns True for
CanPaste() (seems like an STC bug to me):</p>
<preclass="literal-block">
def CanCopy(self):
"""Return True if text is selected and can be copied."""
<li>Renamed <ttclass="literal"><spanclass="pre">PyCrust</span></tt> package to <ttclass="literal"><spanclass="pre">py</span></tt>.</li>
<li>Moved code to wxPython's CVS repository.</li>
</ul>
<p>Fixed bug in <ttclass="literal"><spanclass="pre">introspect.py</span></tt> on introspecting objects occurring
immediately after a secondary prompt, like this:</p>
<preclass="literal-block">
>>> l = [1, 2, 3]
>>> for n in range(3):
... l. <-- failed to popup autocomplete list
</pre>
<p>Added documentation files:</p>
<ulclass="simple">
<li>PyManual.txt</li>
<li>wxPythonManual.txt</li>
<li>wxPythonPackage.txt</li>
<li>wxPythonExamples.txt</li>
</ul>
<p>Added PyAlaMode and PyAlaCarte code editors.</p>
<p>Major refactoring to support <ttclass="literal"><spanclass="pre">editor</span></tt> and <ttclass="literal"><spanclass="pre">shell</span></tt> from the same
base.</p>
<p>Renamed program files:</p>
<ulclass="simple">
<li><ttclass="literal"><spanclass="pre">PyCrustApp.py</span></tt> to <ttclass="literal"><spanclass="pre">PyCrust.py</span></tt></li>
<li><ttclass="literal"><spanclass="pre">PyFillingApp.py</span></tt> to <ttclass="literal"><spanclass="pre">PyFilling.py</span></tt></li>
<li><ttclass="literal"><spanclass="pre">PyShellApp.py</span></tt> to <ttclass="literal"><spanclass="pre">PyShell.py</span></tt></li>
<li><ttclass="literal"><spanclass="pre">wrap.py</span></tt> to <ttclass="literal"><spanclass="pre">PyWrap.py</span></tt></li>
</ul>
<p>Removed disabling of autocomplete for lists of 2000 items or more.
The current implementation of wxSTC can now handle lists this big.</p>
<p>Improved handling of <ttclass="literal"><spanclass="pre">sys.path</span></tt> to mimic the standard Python shell.</p>
<p>Wrapped <ttclass="literal"><spanclass="pre">sys.ps1</span></tt>, <ttclass="literal"><spanclass="pre">sys.ps2</span></tt>, and <ttclass="literal"><spanclass="pre">sys.ps3</span></tt> in <ttclass="literal"><spanclass="pre">str()</span></tt>.
(Thanks, Kieran Holland.)</p>
<p>Fixed minor things found by PyChecker.</p>
<p>Changed locals to use <ttclass="literal"><spanclass="pre">__main__.__dict__</span></tt> and added code to clean up
the namespace, making it as close to the regular Python environment as
possible. This solves the problem of pickling and unpickling
instances of classes defined in the shell.</p>
<p>Made <ttclass="literal"><spanclass="pre">shell.PasteAndRun()</span></tt> a little more forgiving when it finds a
ps2 prompt line with no trailing space, such when you copy code from a
web page.</p>
<p>Improved autocomplete behavior by adding these to shell:</p>
<p>Added "help" to startup banner info.</p>
<p>Made all <ttclass="literal"><spanclass="pre">wx</span></tt> and <ttclass="literal"><spanclass="pre">stc</span></tt> imports explicit. No more <ttclass="literal"><spanclass="pre">import</span><spanclass="pre">*</span></tt>.</p>
<p>Replaced use of the <ttclass="literal"><spanclass="pre">wx</span></tt> module's <ttclass="literal"><spanclass="pre">true</span></tt> and <ttclass="literal"><spanclass="pre">false</span></tt> with
Python's <ttclass="literal"><spanclass="pre">True</span></tt> and <ttclass="literal"><spanclass="pre">False</span></tt>.</p>
<p>Changed <ttclass="literal"><spanclass="pre">introspect.getRoot()</span></tt> to use <ttclass="literal"><spanclass="pre">tokenize</span></tt> module. This
does a slightly better job than the previous parsing routine and the
code is clearer.</p>
<p>Improved handling of whitespace and empty types during introspection.</p>
<p>Fixed cut/copy clipboard problem under Linux. (Robin Dunn rocks!!!)</p>
<p>Added shell.about() which works like this:</p>
<preclass="literal-block">
>>> shell.about()
PyCrust Version: 0.8
Shell Revision: 1.80
Interpreter Revision: 1.15
Python Version: 2.2.2
wxPython Version: 2.3.3.1
Platform: linux2
</pre>
<p>Added copy plus and paste plus to shell menu.</p>
<p>Moved shell menu from <ttclass="literal"><spanclass="pre">shell.py</span></tt> to <ttclass="literal"><spanclass="pre">shellmenu.py</span></tt>.</p>
<p>Added <ttclass="literal"><spanclass="pre">time.sleep()</span></tt> in <ttclass="literal"><spanclass="pre">readline()</span></tt> and <ttclass="literal"><spanclass="pre">OnIdle()</span></tt> event
<p>Improved support for empty types in the shell: <ttclass="literal"><spanclass="pre">[]</span></tt>, <ttclass="literal"><spanclass="pre">()</span></tt> and
<ttclass="literal"><spanclass="pre">{}</span></tt> as far as when call tips and autocompletion are available.</p>
<p>Added support for the other triple string - <ttclass="literal"><spanclass="pre">''''''</span></tt>.</p>
<p>Refactored <ttclass="literal"><spanclass="pre">introspect.py</span></tt> to improve testability.</p>
<p>Improved call tips for unbound methods by leaving the "self"
parameter, since unbound methods require an instance be passed.</p>
<p>Fixed call tip bug where a tip was displayed when a "(" was typed
after an object that wasn't callable.</p>
<p>Fixed <ttclass="literal"><spanclass="pre">getAllAttributeNames</span></tt> when <ttclass="literal"><spanclass="pre">str(object)</span></tt> fails.</p>
<p>Added brace highlighting. (Thank you, Kevin Altis.)</p>
<p>Fixed problem displaying unicode objects in <ttclass="literal"><spanclass="pre">PyFilling</span></tt>.</p>
<p>Changed how <ttclass="literal"><spanclass="pre">filling.py</span></tt> checks for expandable objects. Lists are
now expandable objects.</p>
<p>Made the key handling more robust when there is an active text
selection that includes text prior to the last primary prompt. Thanks
to Raul Cota for pointing this out.</p>
<p>Fixed wxSTC problem with brace highlighting and non-us keyboards.
(Thank you for the patch, Jean-Michel Fauth.)</p>
<p>Added <ttclass="literal"><spanclass="pre">busy</span><spanclass="pre">=</span><spanclass="pre">wxBusyCursor()</span></tt> to key points in <ttclass="literal"><spanclass="pre">shell</span></tt> and
<p>Added <ttclass="literal"><spanclass="pre">OnCloseWindow</span></tt> handler to <ttclass="literal"><spanclass="pre">ShellFrame</span></tt> and <ttclass="literal"><spanclass="pre">CrustFrame</span></tt>.</p>
<p>Default to <ttclass="literal"><spanclass="pre">SetWrapMode(1)</span></tt> for shell and namespace viewer.</p>
<p>Added <ttclass="literal"><spanclass="pre">shell.wrap()</span></tt> and <ttclass="literal"><spanclass="pre">shell.zoom()</span></tt>.</p>
<p>Added autoCompleteKeys hooks for Raul Cota.</p>
<p>Cleaned up various little key handling bugs.</p>
<p>Changed input methods to get values from shell, rather than dialog
boxes. Renamed <ttclass="literal"><spanclass="pre">readIn</span></tt> to <ttclass="literal"><spanclass="pre">readline</span></tt> and <ttclass="literal"><spanclass="pre">readRaw</span></tt> to
<p>Fixed <ttclass="literal"><spanclass="pre">OnChar()</span></tt> issues effecting European keyboards, as reported by
Jean-Michel Fauth.</p>
<p>Fixed <ttclass="literal"><spanclass="pre">introspect.py</span></tt> issue with xmlrpc objects reported by Kevin
Altis.</p>
<p>Fixed some introspect/PyFilling issues with regard to Python 2.2.</p>
<p>Fixed font background color as reported by Keith J. Farmer. (Thanks)</p>
<p>Fixed problem with call tips and autocompletion inside multiline
commands as report by Kevin Altis.</p>
<p>Improved <ttclass="literal"><spanclass="pre">OnKeyDown</span></tt> handling of cut/copy/paste operations based on
feedback from Syver Enstad. (Thanks)</p>
<p>Added a <ttclass="literal"><spanclass="pre">shell.help()</span></tt> method to display some help info.</p>
<p>Changed sort of items in the namespace viewer to case insensitive.</p>
<p>Changed <ttclass="literal"><spanclass="pre">attributes.sort(lambda</span><spanclass="pre">x,</span><spanclass="pre">y:</span><spanclass="pre">cmp(x.upper(),</span><spanclass="pre">y.upper()))</span></tt> in
advance of an upcoming fix to an autocompletion matching bug in wxSTC.</p>
<p>Improved support for ZODB by allowing namespace drilldown into BTrees.</p>
<p>Added <ttclass="literal"><spanclass="pre">shell.PasteAndRun()</span></tt> to support pasting multiple commands into
the shell from the clipboard. Ctrl+Shift+V or v.</p>
<p>Enter now always processes a command (or copies down a previous one.)
To insert a line break, press Ctrl+Enter.</p>
<p>Escape key clears the current, unexecuted command.</p>
<p>History retrieval changed to replace current command. Added new keys
to insert from history - Shift+Up and Shift+Down.</p>
<p>Better call tips on objects with <ttclass="literal"><spanclass="pre">__call__</span></tt> methods.</p>
<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>Changed <ttclass="literal"><spanclass="pre">introspect.getAttributeNames()</span></tt> to do a case insensitive
sort.</p>
<p>Changed Cut/Copy/Paste to deal with prompts intelligently. Cut and
Copy remove all prompts. Paste can handle prompted or not-prompted
text.</p>
<p>Added <ttclass="literal"><spanclass="pre">CopyWithPrompts()</span></tt> method attached to Ctrl-Shift-C for those
times when you really do want all the prompts left intact.</p>
<p>Improved handling of the shell's read-only zone.</p>
<p>Changed <ttclass="literal"><spanclass="pre">CrustFrame.__init__</span></tt> parameter spec to include all
parameters allowed by a <ttclass="literal"><spanclass="pre">wxFrame</span></tt>.</p>
<p>Changed <ttclass="literal"><spanclass="pre">FillingText</span></tt> to be read-only.</p>
<p>Renamed <ttclass="literal"><spanclass="pre">PyCrust.py</span></tt> to <ttclass="literal"><spanclass="pre">PyCrustApp.py</span></tt> to eliminate
package/module name conflicts that kept you from doing <ttclass="literal"><spanclass="pre">from</span><spanclass="pre">PyCrust</span>
<spanclass="pre">import</span><spanclass="pre">shell</span></tt> inside files located in the <ttclass="literal"><spanclass="pre">PyCrust</span></tt> directory.</p>
<p>Renamed <ttclass="literal"><spanclass="pre">PyFilling.py</span></tt> to <ttclass="literal"><spanclass="pre">PyFillingApp.py</span></tt> and <ttclass="literal"><spanclass="pre">PyShell.py</span></tt> to
<ttclass="literal"><spanclass="pre">PyShellApp.py</span></tt> to maintain consistency.</p>
<p>Removed the <ttclass="literal"><spanclass="pre">__date__</span></tt> property from all modules.</p>
<p>Fixed bug in <ttclass="literal"><spanclass="pre">introspect.getCallTip()</span></tt>, reported by Kevin Altis.</p>
<p>Added <ttclass="literal"><spanclass="pre">PyFilling.py</span></tt> and <ttclass="literal"><spanclass="pre">filling.py</span></tt>.</p>
<p><ttclass="literal"><spanclass="pre">PyShell.py</span></tt> and <ttclass="literal"><spanclass="pre">PyFilling.py</span></tt> can now be run standalone, as well
as <ttclass="literal"><spanclass="pre">PyCrust.py</span></tt>.</p>
<p>Added <ttclass="literal"><spanclass="pre">crust.py</span></tt> and moved some code from <ttclass="literal"><spanclass="pre">PyCrust.py</span></tt> to it.</p>
<p>Added command history retrieval features submitted by Richie Hindle.</p>
<p>Changed <ttclass="literal"><spanclass="pre">shell.write()</span></tt> to replace line endings with OS-specific
endings. Changed <ttclass="literal"><spanclass="pre">shell.py</span></tt> and <ttclass="literal"><spanclass="pre">interpreter.py</span></tt> to use
<ttclass="literal"><spanclass="pre">os.linesep</span></tt> in strings having hardcoded line endings.</p>
<p>Added <ttclass="literal"><spanclass="pre">shell.redirectStdin()</span></tt>, <ttclass="literal"><spanclass="pre">shell.redirectStdout()</span></tt> and
<ttclass="literal"><spanclass="pre">shell.redirectStderr()</span></tt> to allow the surrounding app to toggle
requests that the specified <ttclass="literal"><spanclass="pre">sys.std*</span></tt> be redirected to the shell.
These can also be run from within the shell itself, of course.</p>
<p>The shell now adds the current working directory "." to the search
<p>Changed <ttclass="literal"><spanclass="pre">Shell</span></tt> to expect a parameter referencing an Interpreter
class, rather than an intepreter instance, to facilitate subclassing
of Interpreter, which effectively broke when the Editor class was
eliminated.</p>
<p>Fixed <ttclass="literal"><spanclass="pre">PyCrustAlaCarte.py</span></tt>, which had been broken by previous
changes.</p>
<p>Created <ttclass="literal"><spanclass="pre">InterpreterAlaCarte</span></tt> class as an example for use in the
demo.</p>
<p>Split <ttclass="literal"><spanclass="pre">PyCrust.py</span></tt> into <ttclass="literal"><spanclass="pre">PyCrust.py</span></tt> and <ttclass="literal"><spanclass="pre">PyShell.py</span></tt> in
anticipation of <ttclass="literal"><spanclass="pre">PyFilling.py</span></tt>.</p>
<p>Shortened module names by dropping "PyCrust" as a prefix.</p>
<p>Changed <ttclass="literal"><spanclass="pre">version</span></tt> to <ttclass="literal"><spanclass="pre">VERSION</span></tt> in <ttclass="literal"><spanclass="pre">version</span></tt> module.</p>
<p>Added Options menu to PyCrust application.</p>
<p>Eliminated the Editor class (and editor module) by merging with Shell.
This means that Shell "is a" wxStyledTextCtrl rather than "has a".
There just wasn't enough non-gui code to justify the separation.
Plus, Shell will be much easier for gui toolkits/designers to deal
<p>Moved some functionality from <ttclass="literal"><spanclass="pre">PyCrustInterp</span></tt> to <ttclass="literal"><spanclass="pre">introspect</span></tt>.</p>
<p>Changed <ttclass="literal"><spanclass="pre">introspect.getRoot()</span></tt> to no longer remove whitespace from
the command. This was a remnant of a previous approach that, when
left as part of the current approach, turned out to be a really bad
thing.</p>
<p>Changed <ttclass="literal"><spanclass="pre">introspect.getRoot()</span></tt> to allow commands of <ttclass="literal"><spanclass="pre">''</span></tt>, <ttclass="literal"><spanclass="pre">""</span></tt>,
<ttclass="literal"><spanclass="pre">""""""</span></tt>, <ttclass="literal"><spanclass="pre">[]</span></tt>, <ttclass="literal"><spanclass="pre">()</span></tt>, and <ttclass="literal"><spanclass="pre">{}</span></tt> to pass through. This allows
you to type them, followed by a dot, and get autocomplete options on
them.</p>
<p>Changed <ttclass="literal"><spanclass="pre">introspect.getRoot()</span></tt> to identify some situations where
strings shouldn't be considered roots. For example:</p>
<preclass="literal-block">
>>> import PyCrust # To illustrate the potential problem.
>>> len('PyCrust.py')
</pre>
<p>Typing the dot at the end of "PyCrust" in the second line above should
NOT result in an autocompletion list because "PyCrust" is part of a
string in this context, not a reference to the PyCrust module object.
Similar reasoning applies to call tips. For example:</p>
<preclass="literal-block">
>>> len('dir(')
</pre>
<p>Typing the left paren at the end of "dir" should NOT result in a call
tip.</p>
<p>Both features now behave properly in the examples given. However,
there is still the case where whitespace precedes the potential root
and that is NOT handled properly. For example:</p>
<preclass="literal-block">
>>> len('this is a dir(')
</pre>
<p>and:</p>
<preclass="literal-block">
>>> len('This is PyCrust.py')
</pre>
<p>More code needs to be written to handle more complex situations.</p>
<p>Added <ttclass="literal"><spanclass="pre">locals=None</span></tt> parameter to <ttclass="literal"><spanclass="pre">Shell.__init__()</span></tt>.</p>
<p>Added support for magic attribute retrieval. Users can change this