Tkinter bus error right away

B

Ben Kovitz

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#
/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.soBus error


Any suggestions? Is this an Aqua vs. X11 issue?

Many thanks,

Ben Kovitz
 
B

Ben Kovitz

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
 
B

Bill Williams

...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/tkinter/introduction/index.htm
but I found no obvious place to begin

Bill Williams.
 
B

Ben Kovitz

Bill said:
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
 
B

Bill Williams

"Ben Kovitz said:
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
 
B

Ben Kovitz

Bill said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top