Problem with Tkinter on Mac OS X

J

Jean Richelle

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
 
D

Diez B. Roggisch

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

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top