[Pythonmac-SIG] Python 2.2a2 Breaks Tkinter in XDarwin--My Fix

Steven Burr sburr@home.com
Wed, 22 Aug 2001 21:57:16 -0700


I've been running Tkinter in XDarwin with Python 2.1.  This evening I 
downloaded and installed the second alpha of 2.2.  When I tried to run 
one of my Tkinter apps, I got an error message saying that Tkinter.py 
had attempted to call SchedParams from the module MacOS, but that the 
module had no such attribute.  Tkinter.py binds MacOS to _MacOS.  The 
__init__ method of Tk() attempts to call SchedParams if _MacOS evaluates 
to true (line 1483 of my version of Tkinter.py).

I was able to fix my particular problem by commenting out the section of 
Tkinter.py that imports MacOS and setting _MacOS to None.  I thought 
this was a pretty safe fix, since on my set up Tkinter is using the X 
Windows API and not OS X or OS 9.   But please let me know if this is a 
mistake.

Just wanted to pass this along in case anyone else encounters a similar 
problem and to let Jack and the other Python for Mac developers know 
about it.