[issue5122] test_tcl and test_ttk_guionly don't like each other

Eric Smith report at bugs.python.org
Fri Feb 6 23:02:30 CET 2009


Eric Smith <eric at trueblade.com> added the comment:

With the second patch installed, your code snippet does indeed hang for me.

With the third patch installed, I get:
[trunk]$ ./python 
Python 2.7a0 (trunk:69369M, Feb  6 2009, 14:59:32) 
[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> del os.environ['DISPLAY']
>>> import Tkinter
Tkinter.Tk()
>>> Tkinter.Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/python/trunk/Lib/lib-tk/Tkinter.py", line 1643, in __init__
    self.tk = _tkinter.create(screenName, baseName, className,
interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
>>> Tkinter.Tcl().loadtk() # should hang now (with a proper tk version)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/python/trunk/Lib/lib-tk/Tkinter.py", line 1649, in loadtk
    self.tk.loadtk()
_tkinter.TclError: Calling Tk_Init again after a previous call failed
might deadlock

Which I assume is the expected behavior.

Also with the third patch installed, the regrtest's all pass.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5122>
_______________________________________


More information about the Python-bugs-list mailing list