473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tkinter bus error right away

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
5 3538
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
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

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark 'Kamikaze' Hughes | last post by:
In the new Python game I'm developing, I need to crop out individual tiles from larger tilesets, and maintain transparency. Unfortunately, I've run into major deficiencies in both Tkinter and PIL...
2
by: Mark English | last post by:
Is there a safe way to run tkinter in a multithreaded app where the mainloop runs in a background thread ? Here's some test code demonstrating the problem. I'm running Python2.4 under Windows...
0
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo...
1
by: Michael Yanowitz | last post by:
Hello: Below I have included a stripped down version of the GUI I am working on. It contains 2 dialog boxes - one main and one settings. It has the following problems, probably all related, that...
5
by: H J van Rooyen | last post by:
Hi, I am struggling to get the pack method to do what I intend. I am trying to display user input in a seperate window, along with a little description of the field, something like this: ...
2
by: Medi Ochre | last post by:
I've been away from Python for some time, and I'm just starting to look at Tkinter. Just so you know, I'm coming from Visual Basic, where this would, I *think*, not have been a problem, so it must...
44
by: bg_ie | last post by:
Hi, I'm in the process of writing some code and noticed a strange problem while doing so. I'm working with PythonWin 210 built for Python 2.5. I noticed the problem for the last py file...
1
by: C Martin | last post by:
What am I doing wrong in this code? The callback doesn't work from the Entry widget. ##start code import Tkinter tk = Tkinter.Tk() var = Tkinter.StringVar() print var._name def cb(name,...
8
by: karthikbalaguru | last post by:
Hi, One of my python program needs tkinter to be installed to run successfully. I am using Redhat 9.0 and hence tried installing by copying the tkinter-2.2.2-36.i386.rpm alone from the CD 3 to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.