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 2008年06月23日 16:32 by Araneidae, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| input-hook.patch | Araneidae, 2008年06月23日 16:32 | Patch to implement interrupt handling input hook | ||
| Messages (7) | |||
|---|---|---|---|
| msg68638 - (view) | Author: Michael Abbott (Araneidae) | Date: 2008年06月23日 16:32 | |
The (undocumented!) API for PyOS_InputHook has two defects which are addressed in the attached patch (at least when using the readline module): firstly the called hook currently has to guess that input will come on descriptor 0; secondly, any Ctrl-C interrupts encountered during the processing of the input hook are lost. This loss of interrupts can be rather annoying. The attached patch addresses these problems by redefining the API to PyOS_InputHook as int PyOS_InputHook(int file_in); where file_in is the descriptor to monitor (PyOS_InputHook need not return until file_in is ready to read), and the return value is non-zero if and only if processing was interrupted. Testing for interruption is implemented in the HAVE_RL_CALLBACK and HAVE_SELECT branch of Modules/readline.c; other uses retain their original functionality (I believe!). The attached patch was prepared against http://svn.python.org/projects/python/trunk , current at the time of writing. |
|||
| msg87719 - (view) | Author: Daniel Diniz (ajaksu2) * (Python triager) | Date: 2009年05月13日 22:32 | |
Michael, How does this interact with the fix from issue 706406? |
|||
| msg116638 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年09月16日 23:11 | |
I'm unsure as to whether this is a feature request or a behaviour problem, anyone? Regardless could a core dev take a look at the patch which involves changes to the API for PyOS_InputHook, see msg68638. |
|||
| msg233530 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年01月06日 11:59 | |
I don't understand how to reproduce the issue, there is no unit test nor a description how to reproduce the issue. I'm not aware of a bug where CTRL+c is simply ignored. CTRL+c is now well handled in Python 2.7, on Linux and Windows at least. Since the bug is now 7 years old, I just close it as out of date, sorry. |
|||
| msg233977 - (view) | Author: Michiel de Hoon (Michiel.de.Hoon) | Date: 2015年01月14日 00:38 | |
As it happens, we just ran into the same bug. To reproduce this issue, run >>> from Tkinter import * >>> Tk() Then Ctrl-C will not generate a KeyboardInterrupt. At first glance, the solution suggested by the original poster seems good. Can this issue by reopened? I'd be happy to take over this issue report and check the patch in more detail. |
|||
| msg233981 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年01月14日 00:53 | |
This issue is now closed. Please open a new issue. You should mention your OS and the Python version at least. |
|||
| msg233998 - (view) | Author: Michiel de Hoon (Michiel.de.Hoon) | Date: 2015年01月14日 02:13 | |
I have opened a new issue 23237 for this bug; please see http://bugs.python.org/issue23237 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:35 | admin | set | github: 47430 |
| 2015年01月14日 02:13:56 | Michiel.de.Hoon | set | messages: + msg233998 |
| 2015年01月14日 00:53:58 | vstinner | set | messages: + msg233981 |
| 2015年01月14日 00:38:17 | Michiel.de.Hoon | set | nosy:
+ Michiel.de.Hoon messages: + msg233977 |
| 2015年01月06日 11:59:27 | vstinner | set | status: open -> closed nosy: + vstinner messages: + msg233530 resolution: out of date |
| 2014年02月03日 19:44:06 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2010年09月16日 23:11:33 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg116638 stage: test needed -> patch review |
| 2009年05月13日 22:32:18 | ajaksu2 | set | priority: normal components: + Extension Modules, - None versions: + Python 2.7, Python 3.2, - Python 2.6 nosy: + ajaksu2 messages: + msg87719 stage: test needed |
| 2008年06月23日 16:32:22 | Araneidae | create | |