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 scates
Recipients ronaldoussoren, scates
Date 2011-11-09.07:59:14
SpamBayes Score 6.6753404e-05
Marked as misclassified No
Message-id <1320825555.41.0.989618903693.issue13376@psf.upfronthosting.co.za>
In-reply-to
Content
OS: Mac 10.7.2
Python: 2.7.1

Setting a pre input hook in readline has no effect.  This simple example illustrates the problem:

#!/usr/bin/python

import readline

def hook():
        readline.insert_text(' from pre_input_hook')
        readline.redisplay()

readline.set_pre_input_hook(hook)

while True:
        line = raw_input('Prompt ("stop" to quit): ')
        if line == 'stop':
                break
        print 'ENTERED: "%s"' % line


The hook never gets called, thus "from pre_input_hook" is never displayed.
History
Date User Action Args
2011-11-09 07:59:15scatessetrecipients: + scates, ronaldoussoren
2011-11-09 07:59:15scatessetmessageid: <1320825555.41.0.989618903693.issue13376@psf.upfronthosting.co.za>
2011-11-09 07:59:14scateslinkissue13376 messages
2011-11-09 07:59:14scatescreate