This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients belopolsky, cben, eric.araujo, ezio.melotti, flox, giampaolo.rodola, larry, lesmana, loewis, mark.dickinson, ned.deily, pitrou, python-dev, r.david.murray, ronaldoussoren, serhiy.storchaka, steven.daprano, techtonik, tshepang
Date 2013-07-31.08:04:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 31/07/13 17:14, Larry Hastings wrote:

> IMO the optimal solution is that tab preceded by only whitespace indents, and tab preceded by any non-whitespace character attempts to complete.  Can we goad readline into behaving this way?

Yes we can. Attached are a pair of lightweight modules I've used for this for the last 3-4 years, and it works fine in Python 2.4 through 3.3. I put something like this in my

import completer
import history
history = history.History()
completer = completer.Completer(
         bindings=(r'"\C-xo": overwrite-mode',
                   r'"\C-xd": dump-functions',

Originally they were in a single class, but I was persuaded that it was cleaner to separate them.
File name Uploaded steven.daprano, 2013-07-31.08:04:13 steven.daprano, 2013-07-31.08:04:13
Date User Action Args
2013-07-31 08:04:15steven.dapranosetrecipients: + steven.daprano, loewis, ronaldoussoren, mark.dickinson, cben, belopolsky, pitrou, larry, techtonik, giampaolo.rodola, ned.deily, ezio.melotti, eric.araujo, r.david.murray, flox, lesmana, tshepang, python-dev, serhiy.storchaka
2013-07-31 08:04:14steven.dapranolinkissue5845 messages
2013-07-31 08:04:14steven.dapranocreate