[Pythonmac-SIG] TKinter problem
Tom Pollard
tomp at earthlink.net
Wed Oct 26 15:58:47 CEST 2005
On Oct 26, 2005, at 3:18 AM, Mark Asbach wrote:
>> Tkinter command I get a "no display name and no $DISPLAY environment
>> variable" error, e.g.
>
> obviously, you are using a version of Tkinter that relies on the
> X11 Window environment. Just start your python code from apple's /
> Applications/Utilities/X11.app or one of the open source X11 window
> servers for OS X.
You need to have an X11 server running, but you don't need to run
your script from an X11 xterm window. If you set the DISPLAY
variable by hand,
export DISPLAY=:0.0
before running your script, then you can start X11 applications from
the Terminal window. You could put this in your .bashrc file so the
env var will always be there when you're running scripts from the
shell. (It's much more pleasant to work in the Terminal window than
in an xterm.)
Tom
More information about the Pythonmac-SIG
mailing list