[issue9033] cmd module tab misbehavior

2018-01-17 Thread Daniel

Daniel  added the comment:

I can confirm this behaviour for python 3.6.0 on Mac OS X 10.12.6

--
nosy: +boompig
versions: +Python 3.6 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2013-07-16 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I no longer particularly like my patch, although something needs to be done. 
The easiest way forward is likely a (private) helper function in the readline 
module that can translate simple readline configuration strings to something 
that libedit understands and use that in the stdlib where readline bindings are 
replaced (but of course not for reading ~/.inputrc).

Comparing the libedit http://linux.die.net/man/5/editrc and readline 
http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC9 configuration 
languages makes is clear that it is not possible to fully translate a readline 
configuration in a libedit one, but basic conifguration like setting up 
key-bindings should be easy enough.

--
versions: +Python 3.3, Python 3.4 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-08-04 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-07-09 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

Does a translation really need to be in Python?

I use .editrc file in my home directory with this content:

python:bind ^I rl_complete

and everything works fine.

--
nosy: +zvezdan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-07-09 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

We either have to add some translation, or tweak parts of python:

* the cmd module needs to learn how to configure libedit when
  the readline extension was linked to libedit

* the rlcompleter documentation needs to be updated to do the same

And that's just the stdlib. IIRC ipython contains code that uses libedit
style configuration instead of readline when using /usr/bin/python on OSX, and 
there are probably other.

IMHO the current behavior is confusing: the module is named readline, but 
sometimes uses libedit behavior. At least I ensured that the usage of libedit 
can be detected by introspecting readline.__doc__.

A basic translator shouldn't be that hard...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-27 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The attached patch is a workaround for the issue, but isn't someone I'd want to 
commit without some serious cleanup.

As I noted when support for linking with libedit was merged it would be better 
to add a translation layer that translates GNU readline configuration lines to 
BSD libedit ones.

--
keywords: +patch
Added file: http://bugs.python.org/file17782/cmd.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-22 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

scott: 

* Which OSX version are you using?

* Which Python are you using?
  - What is the value of sys.prefix?
  - How did you install it?

* Does 'import readline' work?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-22 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Reaction from scot w.r.t. my questions:


os x 10.5.8

python 2.5.1

/System/Library/Frameworks/Python.framework/Versions/2.5

came default with system

i'm going to try activestate python 2.6 and see if that solves the problem.

import readline does work

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-22 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Some notes: The system python on OSX 10.5 and 10.6 is linked to libedit, not 
GNU readline, and doesn't seem to contain patches that convert stdlib usage of 
readline APIs to the correct way to bind keystrokes to action with libedit.

This results in failure to use libedit at all.

AFAIK this also affects the generic stdlib when linking libedit, which is 
supported in 2.6.5, 2.7 and 3.2. Therefore adding more versions.

--
versions: +Python 2.6, Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-22 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

This (untested) patch should fix the issue for the cmd module:


+++ Lib/cmd.py  (working copy)
@@ -112,7 +112,18 @@
 import readline
 self.old_completer = readline.get_completer()
 readline.set_completer(self.complete)
-readline.parse_and_bind(self.completekey+: complete)
+
+if 'libedit' in readline.__doc__:
+# readline linked to BSD libedit
+if self.completekey == 'tab':
+key = '^I'
+else:
+key = self.completekey
+readline.parse_and_bind(bind %s rl_complete%(key,))
+
+else:
+# readline linked to the real readline
+readline.parse_and_bind(self.completekey+: complete)
 except ImportError:
 pass
 try:

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-22 Thread Shashwat Anand

Shashwat Anand anand.shash...@gmail.com added the comment:

Tested the patch and it works for trunk and python3.2 alpha.
Without adding SDK flag with configure readline module failed to build.

Python build finished, but the necessary bits to build these modules were not 
found:
_gdbm  ossaudiodevreadline
spwd

However for cmd module, tab completion and history(up|down arrow) worked fine.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-19 Thread scott riccardelli

New submission from scott riccardelli s.riccarde...@gmail.com:

noticed that cmd module does not perform completion using TAB on a macintosh 
properly.  instead, the TAB key just places several blank spaces and moves the 
cursor forward.  what it should do is retrieve a list of possibilities for 
completing a command.

--
assignee: ronaldoussoren
components: Macintosh
messages: 108185
nosy: ronaldoussoren, slcott
priority: normal
severity: normal
status: open
title: cmd module tab misbehavior
type: behavior
versions: Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-19 Thread Shashwat Anand

Shashwat Anand anand.shash...@gmail.com added the comment:

It seems readline module is not installed on your system. 
Quoting Ned Deily's comment from issue8365 which will most probably solve your 
issue:
Issue6877 (and subsequent fixes in Issue8066) allows the Python readline 
module to be built and linked with the OS X editline (libedit) library rather 
than with the GNU readline library (which is not included with OS X).  However, 
the libedit included in versions of OS X prior to 10.5 is considered too broken 
to use here.

By default, if you do not specify an --with-universal-archs other than 32-bit 
to configure or if you do not explicitly set MACOSX_DEPLOYMENT_TARGET to 
another value, configure defaults to using 10.4 (or earlier) so the building 
of the readline module is skipped.  You can check this:

 from distutils.sysconfig import get_config_var 
 get_config_var('MACOSX_DEPLOYMENT_TARGET')
'10.4'

(Whether this is the best default is another question.)

As it stands, to be able to build the readline module, either:

(1) supply the GNU readline library as a local library, or

(2) ensure you are building with a deployment target of at least 10.5.  For 
example:

./configure MACOSX_DEPLOYMENT_TARGET=10.6 ; make

Also note that option (2) is not available for 3.1.x since the changes to 
support editline/libedit were not ported to it; they are, however, in 2.6.5, 
2.7 (trunk), and 3.2 (py3k)

--
nosy: +l0nwlf

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9033] cmd module tab misbehavior

2010-06-19 Thread Shashwat Anand

Changes by Shashwat Anand anand.shash...@gmail.com:


--
nosy: +ned.deily

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9033
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com