[Patches] [ python-Patches-558432 ] Prevent Annoying ' ' from readline
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 20 May 2002 13:33:55 -0700
Patches item #558432, was opened at 2002-05-20 20:33
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=558432&group_id=5470
Category: Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Holger P. Krekel (dannu)
Assigned to: Nobody/Anonymous (nobody)
Summary: Prevent Annoying ' ' from readline
Initial Comment:
readline in all python versions is configured
to append a 'space' character for a successful
completion. But for almost all python expressions
'space' is not wanted (see coding conventions PEP 8).
For example if you have a function 'longfunction'
and you type 'longf<TAB>' you get 'longfunction '
as a completion. note the unwanted space at the
end.
The patch fixes this behaviour by setting readline's
append_character to '\0' which means don't append
anything. This doesn't work with readline < 2.1
(AFAIK nowadays readline2.2 is in good use).
An alternative approach would be to make the
append_character
accessable from python so that modules like
the rlcompleter.py can set it to '\0'.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=558432&group_id=5470