diff options
author | Guido van Rossum <guido@python.org> | 1994-08-03 08:01:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-08-03 08:01:43 (GMT) |
commit | e2ca9bd1562224dfab4f6716a8faedf76ca59023 (patch) | |
tree | 1efbdf7ebdf57a4ce01fd88715804ae2664401df | |
parent | 46f24027f4e77070dd31c2ceedc2efe66e1bd530 (diff) | |
download | cpython-e2ca9bd1562224dfab4f6716a8faedf76ca59023.zip cpython-e2ca9bd1562224dfab4f6716a8faedf76ca59023.tar.gz cpython-e2ca9bd1562224dfab4f6716a8faedf76ca59023.tar.bz2 |
* tkintermodule.c: OK, I've fixed the "tty" problem. You're right
no need for the stdin handler, a Tk_DoOneEvent(TK_DONT_WAIT) did
the trick. I've included a diff to tkintermodule.c.
-rw-r--r-- | Modules/_tkinter.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 1653408..9db12df 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -33,7 +33,6 @@ typedef struct methodlist PyMethodDef; #include <tk.h> extern char *getprogramname (); -extern int isatty (int); /* Internal declarations from tkInt.h. */ extern int tk_NumMainWindows; @@ -1012,20 +1011,12 @@ EventHook () PyErr_Print (); } if (tk_NumMainWindows > 0) - Tk_DoOneEvent (0); + Tk_DoOneEvent (TK_DONT_WAIT); return 0; } #endif /* WITH_READLINE */ static void -StdinProc (clientData, mask) - ClientData clientData; - int mask; -{ - /* Do nothing. */ -} - -static void Tkinter_Cleanup () { /* XXX rl_deprep_terminal is static, damned! */ @@ -1056,10 +1047,6 @@ PyInit_tkinter () v = Py_BuildValue ("i", TK_EXCEPTION); PyDict_SetItemString (d, "EXCEPTION", v); - /* Unblock stdin. */ - if (isatty (0)) - Tk_CreateFileHandler (0, TK_READABLE, StdinProc, (ClientData) 0); - #ifdef WITH_READLINE rl_event_hook = EventHook; #endif /* WITH_READLINE */ |