Bugs item #1053687, was opened at 2004-10-25 07:31
Message generated for change (Settings changed) made by kbk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1053687&group_id=5470

>Category: IDLE
>Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Michiel de Hoon (mdehoon)
>Assigned to: Kurt B. Kaiser (kbk)
Summary: PyOS_InputHook not called in subprocess

Initial Comment:
PyOS_InputHook is a variable points to a user-defined
function (e.g. in an extension module) that is to be
called periodically when Python is idle (e.g. waiting
for user input). It is used for example by Tkinter to
get messages delivered to the graphics window. For
Python run from the command prompt, PyOS_InputHook (if
not NULL) is called ten times per second.

In IDLE, when a subprocess is being used (so the
default behavior), the main process and the subprocess
each have their own PyOS_InputHook. The problem is that
the subprocess (the one that runs the user's commands)
does not call PyOS_InputHook.

So if a user (in IDLE) imports an extension module that
sets PyOS_InputHook, the extension module will not run
correctly as PyOS_InputHook is being ignored.

The solution to this problem is probably quite simple,
maybe just a line

if (PyOS_InputHook) PyOS_InputHook();

but I am not familiar enough with threads to be able to
figure out what the best location for such a line would
be. I tried putting it inside the loop in
PyEval_EvalFrame in Python/ceval.c, which solved the
problem on some platforms but not on others.

--Michiel.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1053687&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to