It turns out that the problem indeed was Tkinter
. I'm using the 64bit Mac version of EPDPython and for some reason they've decided to link Tk/Tcl to X11 instead of aqua or cocoa.
OsX 10.8 however comes preinstalled with the correct version of Tk/Tcl and the default python installation /usr/bin/python.2.7
works out of the box because it uses the correct windowing system for Tkinter
. The solution is to just remove the wrong libraries from the EPD installation and it'll fall back on the correct system ones.
To try if the suggested fix will work run the system python with
$ /usr/bin/python2.7
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
>>>
that should complete without a problem (no dialog boxes), if so you're system python is fine, remove these
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/libtcl8.5.dylib
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/libtk8.5.dylib
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/lib-dynload/_tkinter.so
and python should fall back on the system ones in
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so