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.
Created on 2004年10月25日 12:31 by mdehoon, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg22850 - (view) | Author: Michiel de Hoon (mdehoon) * | Date: 2004年10月25日 12:31 | |
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. |
|||
| msg109741 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年07月09日 14:07 | |
Wuld anyone with the relevant expertise care to comment on this please? |
|||
| msg145851 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2011年10月18日 18:25 | |
This is related to http://bugs.python.org/issue989712 |
|||
| msg156778 - (view) | Author: Andrew Svetlov (asvetlov) * (Python committer) | Date: 2012年03月25日 21:51 | |
Let's look on IDLE only. The problem has been fixed by #989712 I will close the issue next week if no objections. |
|||
| msg157493 - (view) | Author: Andrew Svetlov (asvetlov) * (Python committer) | Date: 2012年04月04日 16:40 | |
Closing as wan't fix. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:07 | admin | set | github: 41074 |
| 2012年04月04日 16:40:33 | asvetlov | set | status: open -> closed messages: + msg157493 assignee: kbk -> asvetlov resolution: wont fix stage: test needed -> resolved |
| 2012年03月26日 13:27:48 | asvetlov | set | versions: + Python 3.3, - Python 3.1, Python 2.7, Python 3.2 |
| 2012年03月25日 21:51:21 | asvetlov | set | messages: + msg156778 |
| 2012年03月21日 11:58:21 | asvetlov | set | nosy:
+ asvetlov |
| 2011年10月18日 18:25:51 | roger.serwy | set | nosy:
+ roger.serwy messages: + msg145851 |
| 2010年08月19日 17:56:33 | BreamoreBoy | set | nosy:
+ gpolo |
| 2010年07月09日 14:07:57 | BreamoreBoy | set | nosy:
+ BreamoreBoy title: PyOS_InputHook not called in subprocess -> PyOS_InputHook not called in IDLE subprocess messages: + msg109741 versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6 |
| 2009年02月14日 18:19:12 | ajaksu2 | set | stage: test needed type: behavior versions: + Python 2.6, - Python 2.5 |
| 2004年10月25日 12:31:42 | mdehoon | create | |