473,383 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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 3528
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.