]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
use $DISPLAY
authorGuido van Rossum <guido@python.org>
Thu, 7 Sep 1995 19:44:48 +0000 (19:44 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 7 Sep 1995 19:44:48 +0000 (19:44 +0000)
Demo/tkinter/guido/wish.py

index 5cbb1b90c221b396eaa2e34f27b7a080af85bf7b..eec4b695307686e11ab960615fb218efcd37c154 100755 (executable)
@@ -1,8 +1,9 @@
 # This is about all it requires to write a wish shell in Python!
 
 import tkinter
+import os
 
-tk = tkinter.create(':0', 'wish', 'Tk', 1)
+tk = tkinter.create(os.environ['DISPLAY'], 'wish', 'Tk', 1)
 tk.call('update')
 
 cmd = ''