[Patches] [ python-Patches-462122 ] add readline startup and pre_event hooks

noreply@sourceforge.net noreply@sourceforge.net
Wed, 19 Sep 2001 13:22:19 -0700


Patches item #462122, was opened at 2001-09-16 16:50
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=462122&group_id=5470

Category: Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthew Mueller (donut)
>Assigned to: Martin v. Löwis (loewis)
Summary: add readline startup and pre_event hooks

Initial Comment:
Adds support for the readline rl_startup_hook and
rl_pre_event_hook callbacks.  For example, the startup
hook can be used to insert text to begin editing rather
than always starting with a blank entry.  I just added
the pre_event hook too since it was there. 

Supporting rl_event_hook could be done too, but its
already set to PyOS_InputHook and I'm not sure what
significance this has or if it could just be called in
addition to that.
In order to avoid too much code dupe I moved some stuff
into a generic hook setter func.  However I'm not 100%
sure of the thread state stuff, if it really needs to
store a seperate one per each hook or if it should only
store one.



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=462122&group_id=5470