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.

Author eric.smith
Recipients eric.smith, gpolo, loewis
Date 2009-02-06.22:02:27
SpamBayes Score 1.2481849e-11
Marked as misclassified No
Message-id <[email protected]>
In-reply-to
Content
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.
History
Date User Action Args
2009-02-06 22:02:30eric.smithsetrecipients: + eric.smith, loewis, gpolo
2009-02-06 22:02:30eric.smithsetmessageid: <[email protected]>
2009-02-06 22:02:28eric.smithlinkissue5122 messages
2009-02-06 22:02:27eric.smithcreate