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 2012年02月27日 03:13 by Narnie.Harshoe, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg154427 - (view) | Author: Narnie Harshoe (Narnie.Harshoe) | Date: 2012年02月27日 03:13 | |
In a normal python program, Ctrl-C will set up a KeyboardInterrupt and terminate the program. This works with a normal python script, including GTK2 gtk.main(), but GTK3 Gtk.main() (even when used in a more robust GTK program that coded below) will not terminate with Ctrl-C requiring a Ctrl-Z and killing the job to terminate. See the commmand line output below: $ python -c "while True: > pass > " ^CTraceback (most recent call last): File "<string>", line 1, in <module> KeyboardInterrupt $ python -c "import gtk > gtk.main() > " ^CTraceback (most recent call last): File "<string>", line 2, in <module> KeyboardInterrupt $ python -c "from gi.repository import Gtk > Gtk.main() > " ^C ^C ^Z [1]+ Stopped python -c "from gi.repository import Gtk Gtk.main() " $ kill %1 [1]+ Stopped python -c "from gi.repository import Gtk Gtk.main() " The behaviour under Gtk.main() should be changed to respond to the KeyboardInterrupt. |
|||
| msg154437 - (view) | Author: Charles-François Natali (neologix) * (Python committer) | Date: 2012年02月27日 07:52 | |
> The behaviour under Gtk.main() should be changed to respond to the > KeyboardInterrupt. Well, you should report that to (Py)GTK folks then :-) Either they set up a SIGINT handler, or they catch the KeyboardInterrupt exception, but that's not a problem with Python. Closing. |
|||
| msg154519 - (view) | Author: Narnie Harshoe (Narnie.Harshoe) | Date: 2012年02月27日 23:50 | |
Understood. I didn't realize it was 3rd party. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:27 | admin | set | github: 58346 |
| 2012年02月27日 23:50:21 | Narnie.Harshoe | set | messages: + msg154519 |
| 2012年02月27日 07:52:49 | neologix | set | status: open -> closed type: behavior nosy: + neologix messages: + msg154437 resolution: not a bug stage: resolved |
| 2012年02月27日 03:13:27 | Narnie.Harshoe | create | |