By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,209 Members | 1,706 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,209 IT Pros & Developers. It's quick & easy.

Tkinter bus error right away

P: n/a
Hi, I just tried to run Tkinter on OS X 10.3.9 under Python 2.4.3, and
I'm getting a bus error as soon as I call Tk(). Googling has turned up
info other Tkinter bus errors, but not this one that occurs right away,
before doing anything fancy.

Tk/Tcl is definitely installed on my computer, as verified by running
"wish" and seeing the window come up. "info patchlevel" returns 8.4.5.

Here's the tail of the output from python -v:
Python 2.4.3 (#1, Mar 30 2006, 11:02:15)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import readline # dynamically loaded from
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-dynload/readline.so
>>from Tkinter import *
#
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tkinter.pyc
has bad mtime
import Tkinter # from
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tkinter.py
# wrote
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tkinter.pyc
import _tkinter # dynamically loaded from
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-dynload/_tkinter.so
#
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tkconstants.pyc
matches
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tkconstants.py
import Tkconstants # precompiled from
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk/Tkconstants.pyc
import MacOS # dynamically loaded from
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-dynload/MacOS.so
>>root = Tk()
Bus error
Any suggestions? Is this an Aqua vs. X11 issue?

Many thanks,

Ben Kovitz

Sep 6 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Well, I've made some progress--mostly installing and re-installing
things to make sure I've got the latest version. I finally got the
"Hello World" program at http://docs.python.org/lib/node718.html to
work, but only under Python 2.3. Under Python 2.4, both "Hello World"
and IDLE just sit there with a spinning beachball, and won't exit until
I give them a SIGQUIT. This is all on a Mac running OS X 10.3.9.

Has anyone gotten Tkinter running with Python 2.4 on a Mac?

Thanks,

Ben Kovitz

Sep 13 '06 #2

P: n/a
In article <11**********************@h48g2000cwc.googlegroups .com>,
"Ben Kovitz" <bk*****@acm.orgwrote:
>...I finally got the
"Hello World" program at http://docs.python.org/lib/node718.html to
work, but only under Python 2.3.

Has anyone gotten Tkinter running with Python 2.4 on a Mac?
The Hello World example works for me. You have to save as applet, though.

Can anybody recommend some examples showing how to get the 'text'
module to work? There is a lot of information in
http://www.pythonware.com/library/tk...tion/index.htm
but I found no obvious place to begin

Bill Williams.
Sep 13 '06 #3

P: n/a

Bill Williams wrote:
"Ben Kovitz" <bk*****@acm.orgwrote:
...I finally got the
"Hello World" program at http://docs.python.org/lib/node718.html to
work, but only under Python 2.3.

Has anyone gotten Tkinter running with Python 2.4 on a Mac?
The Hello World example works for me. You have to save as applet, though.
Thanks for the suggestion, Bill! I would never have guessed that it
would make a difference if you make your script an applet (that seems
very strange). Now, here's a stupid question: how do you save as an
applet? I know IDLE can do that, but my 2.4 IDLE is failing
because...Tkinter isn't working with Python 2.4 (same "spinning
beachball forever" as Hello World). If you know a quick way to do it,
that would be great, before I go digging into the source code of IDLE.

Maybe this is a better question for me to ask: *How* did you get
Python 2.4 running with Tkinter on OS X?

Ben Kovitz

Sep 14 '06 #4

P: n/a
In article <11**********************@i42g2000cwa.googlegroups .com>,
"Ben Kovitz" <bk*****@acm.orgwrote:
Maybe this is a better question for me to ask: *How* did you get
Python 2.4 running with Tkinter on OS X?

Ben Kovitz
Hi Ben

I am by no means a Python expert, but finding my way slowly. There is a
lot of documentation, but it seems hard to find the critical nuggets
among the mass. (Rather like playing Colossal Cave long ago!)

I didn't do anything special to get Python 2.4 and Tkinter running on OS
10.3.9. Just downloaded and installed MacPython OSX 2.4.1 dmg (Mar 31,
2005) and TclTk Aqua 8.4.10 dmg (June 6 2005). The IDE About box says
IDE 1.0.2, Python 2.4.1 #2 Mar 31 2005 build 1666, and it all just
works, including saving a script as an applet.

The point about applets is that one nugget of information points out
that the graphics environments like Tkinter conflict with the IDE
graphics environment, so you can't run them under the IDE, and saving as
applets was the easiest way to get stuff to run standalone.

Cheers, Bill Williams
Sep 15 '06 #5

P: n/a
Bill Williams wrote:
In article <11**********************@i42g2000cwa.googlegroups .com>,
"Ben Kovitz" <bk*****@acm.orgwrote:
Maybe this is a better question for me to ask: *How* did you get
Python 2.4 running with Tkinter on OS X?

I didn't do anything special to get Python 2.4 and Tkinter running on OS
10.3.9. Just downloaded and installed MacPython OSX 2.4.1 dmg (Mar 31,
2005) and TclTk Aqua 8.4.10 dmg (June 6 2005). The IDE About box says
IDE 1.0.2, Python 2.4.1 #2 Mar 31 2005 build 1666, and it all just
works, including saving a script as an applet.

The point about applets is that one nugget of information points out
that the graphics environments like Tkinter conflict with the IDE
graphics environment, so you can't run them under the IDE, and saving as
applets was the easiest way to get stuff to run standalone.
Thanks for the info, Bill. Now I understand the need to create an
applet. I want to run stand-alone anyway, and the IDE was getting
"spinning beachball forever". So it looks like I just have some sort
of incompatibility between installed versions.

I was going hang my head in resignation and try reinstalling
everything, but I noticed that Python 2.5 got officially released
today, so I installed it to use on something else. I tried the Tkinter
"Hello World" app, and works! Hooray! So now I'm in business.

Ben Kovitz

Sep 20 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.