Re: [Python-Dev] PyOS_InputHook enhancement proposal

2004-12-10 Thread Michael Hudson
Keith Dart <[EMAIL PROTECTED]> writes: > I did modify the readline module that hooks this and can call back > to a Python function. There are also methods for installing and > removing the Python function. I did this for a different reason. I > need Python signal handlers to run, and they don't ru

Re: [Python-Dev] PyOS_InputHook enhancement proposal

2004-12-09 Thread Keith Dart
Aahz wrote: On Thu, Dec 09, 2004, Michiel Jan Laurens de Hoon wrote: My suggestion is therefore to replace PyOS_InputHook by two functions PyOS_AddInputHook and PyOS_RemoveInputHook, and let Python keep track of which hooks are installed. This way, an extension module can add a hook function withou

Re: [Python-Dev] PyOS_InputHook enhancement proposal

2004-12-09 Thread Aahz
On Thu, Dec 09, 2004, Michiel Jan Laurens de Hoon wrote: > > My suggestion is therefore to replace PyOS_InputHook by two functions > PyOS_AddInputHook and PyOS_RemoveInputHook, and let Python keep track of > which hooks are installed. This way, an extension module can add a hook > function without

[Python-Dev] PyOS_InputHook enhancement proposal

2004-12-08 Thread Michiel Jan Laurens de Hoon
PyOS_InputHook is a pointer to a function that is called periodically (ten times per second) while Python is idle, for example, when waiting for a user command. Python C extension modules can set this pointer to a hook function defined in the extension module. For example, _tkinter.c makes use of P