Problem with Tkinter on Mac OS X

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jean Richelle

    #1

    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
  • Diez B. Roggisch

    #2
    Re: Problem with Tkinter on Mac OS X

    Jean Richelle schrieb:[color=blue]
    > 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 ?[/color]

    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:



    and here



    Diez

    Comment

    Working...