Cross-platform GUI app -- Tkinter?

Mark 'Kamikaze' Hughes kamikaze at
Thu Jul 12 23:13:57 EDT 2001

12 Jul 2001 15:13:51 -0700 in <3b4e211f$1 at>,
Steve R. Hastings <steveha at> spake:
> Hello.  I am new to Python, studying books to come up to speed.
> I have one question I have not really seen discussed in FAQs and such:
> If I want to make a GUI application with menus and such, and I want it to
> be easily portable to multiple platforms, what is the best way to do it?
> At this point I suspect Tkinter is the way to go.
> The reason I'm asking is that I found an expensive Tkinter book that will
> be on sale for a couple more days, and if Tkinter is the way to go, I'll
> buy that book now.  Normally I would keep reading up on Python until I
> could answer the question myself, but I don't want to miss the sale price!
> Actually, do I need the expensive book?  Is there a web site you like that
> explains Tkinter well?

  The online material at is okay, but nothing to write
home about.  OTOH, if the expensive book is John Grayson's _Python and
Tkinter Programming_, get it now, it's a damn fine book.

  That's how I learned Tkinter for my computer RPG written in Python,
Umbra: <>

  Tkinter works very nicely, very Pythonically.

> In a perfect world, I'd like my Python program to be compiled to Java
> bytecodes and thus theoretically portable anywhere.  Does the use of
> Tkinter make this impossible?

  I believe there's actually some kind of port of Tkinter to Jython, but
I know nothing about it.

  If what you want is portability, though, Python's probably more
portable than Java (and I speak here as someone who does Java
programming for a living; Python's what I do to relax!).  I compile
Umbra with python -OO (which just imports the two top-level
modules), and then distribute the .pyo files.  They're specific to
Python 2.1 because the Python bytecode is not version-portable, but
anyone with Python 2.1 can run it.

>  My current understanding, which could be
> wrong, is that parts of Tkinter run TCL, so you would need both TCL and
> Tkinter installed on a system before a Python program could use Tkinter.
> I would like my program to be as self-contained as possible to make it easy
> to install.

  For that, you'd want to go to some kind of native compile, because it
will always be a two-step process for most users: install Python or
Java, then install your app.  I just live with the two-step process...

 <a href=""> Mark Hughes </a>
"I will tell you things that will make you laugh and uncomfortable and really
fucking angry and that no one else is telling you.  What I won't do is bullshit
you.  I'm here for the same thing you are.  The Truth." -Transmetropolitan #39

More information about the Python-list mailing list