Py 2.2, wxPy 2.3.3pre3, win98SE
About colours in PyCrust
Patrick wrote:
How important is this feature to you, Jean-Michel? I originally postponed
attempting it after Neil said it wouldn't be easy, way back when I first
started working on PyCrust. And now I've gotten so used to the way it
currently works I hardly notice that the output and error messages don't
have their own color scheme. So I'm just curious about how important this
is
for you and why. And while I'm asking, are there any other features you'd
like to see?
Some random remarks:
- First of all, PyCrust is excellent (*****).
- I'm developping using SciTE as editor. But sometimes, I need 'IDLE' for
short python tests; that why I'am mainly using PyShellApp and not PyCrust.
- Just for fun, I changed the colours in shell.py in order to have the same
colours as in IDLE. It is only when I tested my changes, that I realized
the output messages of IDLE were in blue. I found this feature nice, so I
tried to do the same within shell.py. That's the story. But, to answer your
question, I will say this point is not important to me. I don't thing a
'formatter' (pythonwin) is necessary. It just make the code heavier for a
very small gain. I can live with the python lexer.
- I'm happy to see the sys.ps2 prompt is alive in PyCrust.
- I'm happy too, the tabs are replaced by spaces (Guido's style guide).
Thanks to the SetTabWidth(4) and SetUseTabs(0) methods.
- input() and raw_input() use a wxTextEntryDialogs for an user input.
PyCrust beeing a command line shell, inputs are best read from the stc
control instead of coming from a dialog box. I find the boa approach using
a '<<<' prompt better. For those who prefer a dialog box, the shell.ask()
is ready. Dialog boxes are inadequate for commands like >>> help() or >>>
license().
- As a (wx)Python guru, I guess your are not using the 'show auto
completion' too much. If the 'show auto completion' is on, selecting an item
from the completion list using a cr raises a syntax error. Selecting an
item with the mouse works fine. I think using the keyboard in much more
practical than using the mouse. I don't know if this is a PyCrust or a
scintilla problem, but this should be fixed.
- A menu option you may add, line wrapping. It may be usefull for commands
like >>> sys.path or >>> a = range(100); print a . Of course, you may use
the horizontal scrollbar the see the result, but i think line wrapping is is
better. You have instantaneously the output under your eyes and scrolling a
long horizontal line is slow.
Now I know scitilla a little more, I tested something like
self.SetWrapMode(wxSTC_WRAP_WORD). Infortunately, this is not working
perfectly. Indeed, the lines are wrapped correctly, but after a long output
the shell prompt >>> is no more visible. EnsureCaretVisible() from the
method prompt does not help. Only after a key strike, the prompt become
visilble. I tried different things to force the vertical scrollbar to go to
the bottom, but without success. (By the way, a question, is there in
wxPython something like the vb SendKeys command?)
- I download the latest vesion from CVS before reporting this. Brace
highlighting is great.
- I dont mind you can not edit and save data within PyCrust. PyCrust is an
interactive shell and must remain an interactive shell.
- Finally, I want to mention a point that is a bit apart from the PyCrust
code. Provide a PyCrust.exe for windows users. Why?
Two weeks ago, I visited my brother that works at the European
Synchrotron Radiation Facility, Grenoble, France. With him and some other
scientists, we were discussing about programming languages. I convince them
to test python. But, what is the best way to learn python? The interactive
interpreter, IDLE. Why do not give PyCrust (PyShellApp) a chance? These
people are interesting in numerical computation not in GUI
application. There will not download wxPython to get PyCrust, but the will
find an interest in PyCrust (PyShellApp).
- PyCrust will be a very good visiting-card for wxPython.
I hope I have satisfied your curiosity.
Regards
Jean-Michel Fauth, Switzerland