Mailing List Archive

Tkinter hangs in Emacs in 1.5.2 on Win32
I often prototype fragments of Tkinter code using the interactive Python mode
in NT emacs. Since installing 1.5.2 the interpreter hangs when run
interactively inside Emacs.

If I type
from Tkinter import *
r = Tk()
r.title('pat')

I never get a >>> prompt from the interpreter after entering the r.title()
call.

The same sequence of commands works fine in the regular stand-alone
interpreter.

Does anyone know what's going on before I prepare a bug report?

I'm using Python 1.5.2 on Windows 98 and Windows NT with the Tcl/Tk that comes
with Python 1.5.2 and NT Emacs 20.3.1 with the python-mode.el that comes with
Python 1.5.2.


Pat Knight
VCS Development Manager, The Knowledge Group, Bristol, UK
+44-117-900-7500 Corporate Web: http://www.ktgroup.co.uk
Tkinter hangs in Emacs in 1.5.2 on Win32 [ In reply to ]
>>>>> "PK" == Pat Knight <pat@ktgroup.co.uk> writes:

PK> I often prototype fragments of Tkinter code using the
PK> interactive Python mode in NT emacs. Since installing 1.5.2
PK> the interpreter hangs when run interactively inside Emacs.

| If I type
| from Tkinter import *
| r = Tk()
| r.title('pat')

PK> I never get a >>> prompt from the interpreter after entering
PK> the r.title() call.

PK> The same sequence of commands works fine in the regular
PK> stand-alone interpreter.

PK> Does anyone know what's going on before I prepare a bug
PK> report?

PK> I'm using Python 1.5.2 on Windows 98 and Windows NT with the
PK> Tcl/Tk that comes with Python 1.5.2 and NT Emacs 20.3.1 with
PK> the python-mode.el that comes with Python 1.5.2.

I don't have much time to look into it in detail, but I don't think
it's a python-mode problem. I got the same results as you, so I did
an edebug on py-comint-output-filter-function which sees every line of
text output by the underlying Python interpreter shell, and it is
never seeing the `>>>' you'd expect.

I'd suspect something's going on in Python because I tested it with a
version of NT XEmacs 21 and you tested it with NT Emacs 20.3. I don't
know how much of the subproc code the two Emacsen share, so it's
possible they both have the same bug. I was using Python 1.5.2b2 on
NT.

Sorry I can't be of more help.

-Barry
Tkinter hangs in Emacs in 1.5.2 on Win32 [ In reply to ]
Pat Knight writes:
> I often prototype fragments of Tkinter code using the interactive Python mode
> in NT emacs. Since installing 1.5.2 the interpreter hangs when run
> interactively inside Emacs.

Do you have the latest version of python-mode.el? Do you have
"py-python-command-args" set to ("-i") ? You might also try a setting
of ("-i" "-u") if that doesn't work