[docs] [issue9362] Make exit/quit hint more novice friendly

Alexander Belopolsky report at bugs.python.org
Mon Jul 26 17:32:20 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Mon, Jul 26, 2010 at 10:50 AM, Mark Lawrence <report at bugs.python.org> wrote:
..
> 2) Python is not responsible for dotting every i and crossing every t for a computer novice.

Yes, but it is not responsible for teaching a novice more than one way
to exit the interpreter right off the bat.    Note that the
Ctrl-D/Ctrl-Z recommendation has a long history from the time when
there was no exit/quit object defined in the default site.py and the
alternative to the magic key-press was an unwieldy raise SystemExit.

Note the following bug report from IDLEfork project:

http://sourceforge.net/tracker/?func=detail&atid=109579&aid=693333&group_id=9579

Apparently, some IDEs may want to rebind Ctrl-Z form EOF to (in this
case) undo action.  This is quite reasonable, but it makes the exit
hint misleading.  There are many reasons outside of python control for
EOF to be bound to the keys other than Ctrl-Z/D.   The current logic
in site.py that makes a choice based on the filepath separator
character is quite fragile:

    if os.sep == ':':
        eof = 'Cmd-Q'
    elif os.sep == '\\':
        eof = 'Ctrl-Z plus Return'
    else:
        eof = 'Ctrl-D (i.e. EOF)'

>  What would the novice make of my HP keyboard which doesn't have keys marked RETURN or BS,
> they both have symbols.

There is very little you can do at the command prompt without knowing
where your enter key is.  In fact, you will not even see the hint in
question if you don't press enter after typing exit.   On the other
hand, you can get quite far without using control key and if it is
marked "control" or a national equivalent on your keyboard, you may
not know the ctrl abbreviation for quite some time.  Note that my last
alternative, "Use exit() to exit" or "Enter exit() to exit"  does not
require knowing how the enter key is called.  The user just need to
know the means of entering commands and he or she must know this
before seeing the exit hint anyways.

>  There isn't an ANY key on the keyboard either! :)

Right.  And computer industry would save loads of money in support
calls if they instructed users to press the space bar instead. :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9362>
_______________________________________


More information about the docs mailing list