[Edu-sig] Tkinter window behind IDLE under Mac OS X

Peter Drake drake at lclark.edu
Wed Jan 31 18:01:00 CET 2007


Thanks for all the suggestions, everyone!

Some responses:

DrPython: tempting, because I've used DrScheme in the past. It seems  
a bit of a pain to install X11, wxPython, and DrPython, though. I'd  
like these students to be able to do work on their own machines in  
addition to in the lab.

Crunchy: doesn't look ripe yet, but worth keeping an eye on.

Launching script from python or pythonw: the graphic window still  
pops up behind the terminal.

It looks like the best bet is moving the IDLE window out of the way  
beforehand to make room for the graphics window.

Peter Drake
Assistant Professor of Computer Science
Lewis & Clark College
http://www.lclark.edu/~drake/




On Jan 31, 2007, at 8:15 AM, kirby urner wrote:

>
>
> On 1/30/07, Peter Drake <drake at lclark.edu> wrote:
> I tried running this directly from a terminal:
>
> #!/usr/local/bin/python
> from Tkinter import *
> c = Canvas()
> c.pack()
> c.create_line(0, 0, 20, 30)
> mainloop()
>
> Again, the Tk window pops up behind the terminal.
>
> c = Canvas() already creates a Tk window, but it's not active or in  
> front.
>
> Is there a problem with minimizing the command window or moving
> it out of the way after mainloop()?  With your mouse I mean?  Control
> should return to terminal when you exit Tk mainloop.
>
> In terms of launching mytkinter.py directly from an icon, no command
> window, there oughta be a way on Mac.
>
> Kirby
>


More information about the Edu-sig mailing list