Does Python have a built-in GUI kit? Meaning without using Tcl/Tk.

Because, I'm developing for the iPod touch / iPhone, and I don't want to have the user need to install the Python and Tcl runtimes.

Recommended Answers

All 8 Replies

They're built into the language itself?

GUI's are specific to the OS. What GUIs are available for the IPod and how are you packaging your programs. I don't know what's available for IPods but if there is something like py2exe, you may be able to enbed the graphics in the executable. Also, TCL/Tk/Tkinter, GTK et all may or may not run on the IPod's OS. First you have to find out what's available and then if it can somehow be included with the program. Does IPod have a programming forum where these questions have already been answered. Also you should find out if IPods have a mini python interpreter already or if programs have to be compiled into some form of native code.

There is a Python interpreter (2.5-6) and the Tcl/Tk libraries, along with Ruby, Java, Scheme, and many others.

Should I resort to Tcl/Tk?

The only GUI toolkit built-in to Python is Tk. (And Tcl/Tk most definitely does work on the iPod!)

I know next to nothing about the iPod. Is it an embedded OS?

In any case, it is certainly possible to make a single program that does python/tk, but you will likely have to hack python yourself to do it. Since you've got both libraries, I'm not sure what the problem is. Distribution, maybe?

(Oh, yeah, I'd say go with Tcl, but I don't think the footprint would be prohibitive to go with Python. But then again, I know next to nothing about the iPod...)

Thanks!

So hold on. I can use Tk with JUST python 2.5-6 installed?

The PC Python installation comes with Tkinter, i.e. TCL/TK, but as Duoas said, you will have to write a simple Python+Tkinter (import Tkinter) program and try it on the IPod. It's limited resources would not have a full blown Python installation, so who knows about Tkinter. It's doubtful that IPod has it. Maybe you can install it, but you may have to work with their native toolkit. Sorry, no one here knows much about it.

Thank you, everyone! = )

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.