[Idle-dev] The '>>> ' prompt is bad
tjreedy at udel.edu
Thu Jun 14 23:38:29 CEST 2012
On 6/14/2012 12:47 PM, Alan Gauld wrote:
> On 17/01/12 01:00, Terry Reedy wrote:
>> In http://bugs.python.org/issue7676 msg151418
>> I conclude that putting a prompt on the first user entry line of each
>> statement is a mistake that can only be solved by removing it. I see
>> three alternatives. Discussion here or there welcome.
> Having a prompt *only* on the first line is bad.
> Not having any prompt would be worse.
Two of my three alternatives are to put the prompt *elsewhere*, either
above or to left (with secondary prompts) of the user entry area, but in
any case, cease mixing it with the user entry area in the way it is no
> Doing what the standard interpreter does
The standard interpreter on Windows puts fixed-pixel width prompts (not
so important, but not completely unimportant either) in a separate
fixed-width column (critical) to the left that can be omitted when
copying (also important). That *is* one of my three proposals. So I take
you comment as a vote for that one.
> would be best (and consistent for users of both). ie:
The question is whether this is possible with tk.
The secondary prompt works best with fixed pitch fonts and the ability
to copy rectangular blocks. Issue 7676 is about switching from tabs to 4
spaces for indents. Unicode fonts are variable pitch. With
variable-pitch font and 4 space indents, ... takes much less space than
>>> and consequently the first indent may not look like an indent.
Indeed, with Lucida Sans Unicode, '... ' is *shorter* than '>>> ',
so that the first indent is visually a dedent! This is not acceptible.
So visually, the result is not at all like the standard interpreter.
So again, the question is whether it is possible to segregate a
fixed-width read-only column in a tk text box that properly scrolls with
the main part of the box (and which is omitted from selections).
Notepad++ does this but perhaps it uses native widgets. (Since it is GPL
open source, I could check, but have not.) Notepad++ also grays out the
line-number column, so that there is visually a straight, vertical, text
> Where both prompt characters can be user defined for bonus credits...
> Being able to strip the prompts when copy/pasting (like PyCrust does)
> would earn a gold star.
Best would be the possibility to simply not select prompts.
Terry Jan Reedy
More information about the IDLE-dev