[Edu-sig] PyCrust

Patrick K. O'Brien pobrien@orbtech.com
Fri, 12 Oct 2001 18:33:15 -0500


I'll do my best to answer your questions inline below. (You seem to have
uncovered every existing weakness of PyCrust, btw. <wink>)

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."


> -----Original Message-----
> From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On
> Behalf Of Kirby Urner
> Sent: Friday, October 12, 2001 5:33 PM
> To: pobrien@orbtech.com
> Cc: edu-sig@python.org
> Subject: [Edu-sig] PyCrust
>
> OK, didn't take long to install.  Had to get
> wxPython, for which I didn't find an installer
> for 2.2.  Probably easy enough to do that, but
> I'm with 2.1 now.  Your PyCrust installer
> helpfully found both installations -- I picked
> 2.1 (BTW, does wxPython work on Mac? -- seems
> PyCrust blurb say yours does, yet wxPython page
> mentions only Windows, POSIX -- which I guess
> includes OSX).

PyCrust should work on the Mac as soon as wxPython does, which is supposedly
imminent. But I am not involved in that effort so I can't say for sure. My
goal is to support the same platforms as wxPython.

> So I have PyCrust open, and it does the shell
> mode fine.  I like the tips.
>
> I gather there's no builtin program editor ala
> IDLE.  I should use Scintilla or something like
> that?

That's right. PyCrust doesn't edit files, and I'm not in any hurry to add
that feature. I tend to use Boa Constructor as my IDE, with occasional use
of IDLE and PythonWin.

> Any way to change default colors?  I'm used to
> the IDLE color scheme and/or would like the
> returned values ("computer types...") to be a
> different color (like blue).

User configuration of colors and fonts and such is still on the todo list.

> The response seems pretty snappy on the whole.
>
> One thing that's cool about IDLE is if I have
> a multi-line function or class defined at the shell
> prompt, I can scroll back and click on any of these
> lines to get a full copy of the whole function or
> class -- which I may now edit/revise.  Having only
> a single line copy down doesn't allow easy re-editing.
> If I use copy/paste, I can get multiple lines, but
> the interpreter seems to only recogize the last
> one.

IDLE is definitely more flexible in this area than PyCrust, and I'm at a bit
of a loss to duplicate IDLE's functionality in this regard. It would take
quite an effort to mimic. The best way to deal with multi-line functions is
to use the command history retrieve-previous key (Ctrl-Up) to retrieve the
first command in the series. This positions you in the command history
buffer. Now subsequent uses of command history retrieve-next (Ctrl-Down)
will get you each subsequent line. Not as good as IDLE, but better than
nothing. Hopefully we can make it better in the future.

PyCrust is also pretty weak at autoindenting. Improving that is also on the
todo list.

> Maybe there's something planned around line numbers
> (on the left) that'd let me do this.  If there's
> a way to turn the line numbers off, that'd be cool
> too, as they haven't a lot of meaning to me in shell
> mode, the way I think about it today anyway.

You can easily turn off line numbers by hacking the code, and this will be a
user configuration option down the road. They show up now because I like
them. <wink>

> Not finding a lot of docs (or any, yet), so maybe
> I'm not booting pyCrust the best way.  I open DOS
> box and go ..\python pycrust.py

Documentation? Its on my todo list. Way down towards the bottom,
unfortunately.

> I could convert that into a PIF, or else there's
> the option to use the .pyw extension.  Lemme try
> renaming pycrust.py to pycrust.pyw and booting it
> by clicking in the file manager...
>
> Yeah, that works (had to change the file association
> from python22\python to python21\python -- not a
> problem).  Note:  the blinking cursor after the
> prompt doesn't appear on its own when booting.
> I have to click in that window, then it shows after
> a second or two.

I haven't seen that behavior. What plaform are you on and what version of
wxPython? You can go to Help | About in PyCrust to see this version
information.

I know PyCrust has its shortcomings, but hopefully with more feedback and
assistance I can correct those. In the mean time, I hope it has enough
advantages to earn a place on your desktop.

> Kirby
>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig