473,499 Members | 1,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Tkinter on Mac OS X

Hello,

I installed version 2.4.1 (and I tried also with 2.4.3) of Python
under 10.3.9 (and 10.4.6), and I trying to use Tkinter. For
simplicity I'm testing the "hello world" that I found in the
documentation.
I first launch IDLE, write (cut and paste from the web) the program
in an editing window, save it, and then run it. The window with two
buttons is displayed in the back of the IDLE window (and I cannot
bring it to the front), and there nothing happening when I click
either button.
Did anybody do a fresh install recently and can run program using
Tkinter ?

Jean
May 15 '06 #1
1 2985
Jean Richelle schrieb:
Hello,

I installed version 2.4.1 (and I tried also with 2.4.3) of Python under
10.3.9 (and 10.4.6), and I trying to use Tkinter. For simplicity I'm
testing the "hello world" that I found in the documentation.
I first launch IDLE, write (cut and paste from the web) the program in
an editing window, save it, and then run it. The window with two buttons
is displayed in the back of the IDLE window (and I cannot bring it to
the front), and there nothing happening when I click either button.
Did anybody do a fresh install recently and can run program using Tkinter ?


MacOs is somewhat peculiar when it comes to running GUI-apps. What you
ususally want to (or better have to do) is to cretae a so-called
application bungle. There are several ways to do so - I frequenmtly code
PyObjc-Applications and use xcode + the distutils py2app-extension. The
latter one should work for Tkinter, too.

Then with my MacPython distro, there came a mac-specific IDE that also
allowed to save a script as application.

I sugegst you read up on the whole subject here:

http://pythonmac.org/wiki/FAQ

and here

http://pythonmac.org/wiki/py2app

Diez
May 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2413
by: Ivan Letal | last post by:
I have just tried this code.. Tkinter import * root = Tk() def callback(event): print "clicked at", event.x, event.y frame = Frame(root, width=100, height=100)
2
4129
by: Irmen de Jong | last post by:
Hi, I'm having trouble with the code below. It's just a regular Tk text widget in which you can type and select text as expected, however the call to tkFileDialog.askopenfilename() seems to screw...
2
3849
by: Russell E. Owen | last post by:
I want to support execution of simple user-written scripts in a Tkinter application. The scripts should be able to wait for data and such without hanging the GUI (and without having to write the...
2
991
by: Martin Jensen | last post by:
Hi I have a problem with Qt. My class definition is this: class Button : public QObject, public Tk_Object { Q_OBJECT public: Button() {} Button(Tk_Object &p); ~Button();
0
3562
by: syed_saqib_ali | last post by:
Below is a simple code snippet showing a Tkinter Window bearing a canvas and 2 connected scrollbars (Vertical & Horizontal). Works fine. When you shrink/resize the window the scrollbars adjust...
2
4061
by: Stewart Midwinter | last post by:
this has me puzzled; I've created a small test app to show the problem I'm having. I want to use subprocess to execute system commands from inside a Tkinter app running under Cygwin. When I...
0
2335
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...
2
5130
by: Andrew Trevorrow | last post by:
Our app uses embedded Python to allow users to run arbitrary scripts. Scripts that import Tkinter run fine on Windows, but on Mac OS X there is a serious problem. After a script does "root = Tk()"...
3
1990
by: H J van Rooyen | last post by:
Hi, Still struggling with my GUI exercise - I have the following lines of code in a routine that is bound at <Key-Returnto an instance of Entry : self.disp.Amount_des = Label(self.disp,...
4
2857
by: Davy | last post by:
Hi all, I have written a simple Tkinter program, that is draw a rectangle in a canvas, when I press Up key, the rectangle move up. But the program seems work not properly? My environment is...
0
7132
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
7009
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
7223
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...
0
7390
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
5475
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
4919
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
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
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 ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.