Thank you, Tkinter. (easy to use)

A

argo785

Tonight I needed to draw a series of simple shapes in a window using a
bit of math but didn't have much time to do it. I've got very little
GUI toolkit experience. Briefly had a look at the usually-recommended
heavyweight GUI toolkits, but I didn't want to inherit from widget
classes or override paint methods (not that those things don't have
their place). I just wanted to quickly draw some shapes. Within a few
minutes I had what I needed, and it was by using Tkinter. The code
looked something like this:

~~~~
#!/usr/bin/env python

import Tkinter as tk

root = tk.Tk()

canv = tk.Canvas(root, width=647, height=400, background='white')
canv.pack(side=tk.TOP, fill=tk.BOTH, expand=1)

# drawing happens here ...
canv.create_oval(50, 80, 150, 180)
# ...

root.mainloop()
~~~~

Wow that was *really* easy.

After playing around just a bit more, regular GUI programs are pretty
quick and simple to make as well. My only (minor) complaint is that Tk
doesn't draw text antialiased in the various widgets (menus, labels,
buttons, etc.).

Anyway, thanks Tk and Tkinter!
 
R

r

Hello,

Tkinter is a great GUI toolkit, for what it lacks in prettiness it
more than makes up for in simple and quick GUI building. I think this
is the main reason Tkinter continues to be Python's built-in GUI
toolkit. It is a great place to start for those with no GUI
experience. Sure it will never be as rich as wxPython or the like, but
that is not what Tkinter is made for.

I use Tkinter for all my tools that need a UI, and others as well. The
only complaint i have is the poor support for image types i really
wish there where at least support for one good image like jpg, png,
and full color bitmaps.The canvas widget could also use a little more
functionality, but hey maybe one day i will have time to polish it up
a bit.
 
A

argo785

[snip]
My only (minor) complaint is that Tk
doesn't draw text antialiased in the various widgets (menus, labels,
buttons, etc.).

 From version 8.5 of tcl/tk, it's supposed to do it. See this page:http://www.tcl.tk/software/tcltk/8.5.tml
under 'Highlights of Tk 8.5', item 'Font rendering'. It seems to talk only  
about X11 and Mac OS X; don't know if it works on Windows...

Looking forward to it. Searching around some more, also found this:

http://tkinter.unpythonic.net/wiki/Tk85AndPython

which sheds a little light.

And following a link therein, it would seem that we'll have it by
default with Python 2.7/3.1 -- [this bug](http://bugs.python.org/
issue2983) was closed about 2 weeks ago.
 
A

argo785

[snip]
My only (minor) complaint is that Tk
doesn't draw text antialiased in the various widgets (menus, labels,
buttons, etc.).

 From version 8.5 of tcl/tk, it's supposed to do it. See this page:http://www.tcl.tk/software/tcltk/8.5.tml
under 'Highlights of Tk 8.5', item 'Font rendering'. It seems to talk only  
about X11 and Mac OS X; don't know if it works on Windows...

I also don't know about MS Windows. I've been fortunate enough to not
have to use that OS for *years*.

Also, after some more searching, found this:

http://tkinter.unpythonic.net/wiki/Tk85AndPython

And according to [this](http://bugs.python.org/issue2983), the ttk
support has been merged into Python 2.7/3.1 as of about 2 weeks ago.
 
D

DLitgo

Hello,

Tkinter is a great GUI toolkit, for what it lacks in prettiness it
more than makes up for in simple and quick GUI building. I think this
is the main reason Tkinter continues to be Python's built-in GUI
toolkit. It is a great place to start for those with no GUI
experience. Sure it will never be as rich as wxPython or the like, but
that is not what Tkinter is made for.

I use Tkinter for all my tools that need a UI, and others as well. The
only complaint i have is the poor support for image types i really
wish there where at least support for one good image like jpg, png,
and full color bitmaps.The canvas widget could also use a little more
functionality, but hey maybe one day i will have time to polish it up
a bit.

There is the Python Image Library (PIL), but when I tried to install
it I of course had to install the JPEG package as well which didn't
install correctly. After trying several times to install it (the JPEG
package that is, PIL installed fine, but I only wanted it for the
extra image support) I just gave up.

Does anyone know of a quick and easy install for PIL + JPEG for Mac OS
X (10.5)?
 
T

Terry Reedy

DLitgo said:
Does anyone know of a quick and easy install for
> PIL + JPEG for Mac OS X (10.5)?

If you don't get an answer, try a thread with the above as the title.
There may be a python-mac list somewhere too.
 

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