[Boa Constr] Python Shell - was: RE: IDLE's save-before-run r equirement
Status: Beta
Brought to you by:
riaan
From: Patrick K. O'B. <po...@or...> - 2001-06-21 15:34:11
|
Thank you, Guido, for bearing with me on this whole issue. I think we are getting to the heart of the matter. Because I, too, am an instant gratification person. So let's just talk about the Python Shell (interactive) capabilities as they exist in the various IDEs. I will attempt to explain my take on this situation, what bothers me, and what I'd like to see happen. The four tools under discussion. IDLE, Boa, PythonWin and VPython all have a Python Shell capability. But they all vary in their support of keybindings, coloring, indenting, etc. When someone uses all of these tools and makes use of each Shell, they have to keep in mind all the variations that exist. This is counter-productive and takes away from what should be "instant gratification at all times." I would rather have a common feature set within all Shells, even if it meant giving up features, rather than have the variations that exist now. I would like to see the Python Shell exist as some kind of plug-in or shared code base that all the IDEs could use so that the Python Shell was uniform in all tools on all platforms. I think this fits the Python philosophy and would make life a lot easier for beginners as well as experts. It would also make the Shell available for new, special-case tools that have been discussed, such as a Python Tutor or Python Trivial Pursuit game, where the variations would be solely within the value-add portions and not the fundamental Shell capability (and without creating yet more forks). Here are some specific examples of the variations that bother me (Please don't anyone take offense at these comparisons. I believe they are all objective, demonstrable differences and not just my opinion, though I am clearly opinionated. And if I'm wrong about any of this please let me know.): PYTHONSTARTUP: IDLE and VPython support it with the -s command line switch. Boa will have this feature in the next release (because I asked for it). PythonWin has no support whatsoever for PYTHONSTARTUP to my knowledge. Home key: Type a line of code at the shell prompt (>>>) and then hit the Home key. PythonWin puts the cursor in front of your code (very nice). IDLE and VPython put the cursor in front of the prompt and then beep when you try to continue typing (yuck). Boa puts the cursor in front of the prompt and lets you type over the prompt. When you hit enter it truncates the first four characters from what you typed and tries to execute that (big yuck). I use this feature a lot in PythonWin when I'm copying previous lines down and want to get to the beginning of the line to add more code, like assigning to a variable or some such. When I switch to one of the other tools I have to do Home, Right, Right, Right, Right - way too many keystrokes. Command history: IDLE and VPython have Alt-P (previous) and Alt-N (next), which is very nice. PythonWin has a way to add these bindings, but by default has Ctrl-Up and Ctrl-Down (just to be different?). I don't know how to add the PythonWin bindings to IDLE or VPython. Boa has no command history. Call tips: PythonWin has the best as far as showing what is in a module. IDLE/VPython have the best as far as showing function parameters and docstrings. Boa is way behind. Win32All: PythonWin is the only tool that can deal with the win extensions, like dde or com. This is a major pain. There are times when I'd love to use IDLE but since I'm developing a Windows app that requires DDE I can only use PythonWin. (And I don't really understand why this is but it definitely irritates me to no end.) I'm sure there are other differences, but these are good enough to get my point across. So I will finish with a question - What, if anything, can be done about this situation, or am I barking up the wrong tree? --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: gu...@cj... [mailto:gu...@cj...]On Behalf Of Guido van Rossum Sent: Thursday, June 21, 2001 7:41 AM To: ala...@bt... Cc: is...@li...; po...@or...; ma...@la...; idl...@py...; Ed...@py...; tu...@py... Subject: Re: [Tutor] Re: [Edu-sig] RE: [Idle-dev] IDLE's save-before-run r equirement > > What would switching over to using Scintilla accomplish that > > sticking with IDLE and continuing it's development wouldn't? > > In a word "Reuse". That means one editor to maintain for most > of the Python IDEs. Add a feature to Scintilla and its pretty > trivial for all the IDEs to pick up the new feature without > having to reimplemnent it from scratch. Effort gets concentrated > on the value add bits rather than the nitty gritty of text editing. But IDLE has a bunch of requirements that I don't think Scintilla can provide. IDLE has really two editing modes: the regular module/file editor, and the "Python Shell". IDLE's most redeeming feature, IMO, is the Python Shell. Compare editing an interactive session in PythonWin's console window with IDLE's Python Shell. IMO again, IDLE is infinitely better, because it uses the exact same editing features as the module/file editor, meaning you get proper syntax coloring, automatic indentation, call tips, magic expansion; and on top of that you get per-line syntax checking, whole-command editing, and history recall. In PythonWin's much more primitive console, it's very easy to mess up the input or the output or confuse the auto-indenter. (I'm an instant gratification person, so Python's interactive mode is very important to me.) I could be wrong about Scintilla not supporting this, but if it did, why would PythonWin not use it for *its* console? --Guido van Rossum (home page: http://www.python.org/~guido/) |