Python Tkinter without X11

max.e.brown at gmail.com max.e.brown at gmail.com
Mon Jul 16 10:29:07 PDT 2007


Hello,

I was trying to work through some examples of Tkinter usage in python,
and realised that the Macports python24 and py-tkinter seem to require
X11. Is there some way to do Carbon/ Aqua Tkinter using the Macports
python? Is there some obvious place to look for documentation on this?

Thanks,

Max

python24 @2.4.4_1+darwin_8 (active)
py-tkinter @2.4.4_0 (active)


-8<----------------------------------------------
$ python
Python 2.4.4 (#1, Jun 15 2007, 10:53:01) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> root = Tkinter.Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tkinter.py", line 1569, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":0.0"
>>> 





More information about the macports-users mailing list