Python GUI Programming?
I'm new to Python GUI programming. In fact, I am about to start my first GUI program in python. It seems to me like Tkinter is the standard for this, but I'm running into a problem. Whenever I try to import the Tkinter module, the interpreter tells me its not found. It seemed to me like this module was standard, and actually came with python. Do you actually have to manually installit? Doesn't that decrease portability?
And if I have to install it, is there a way to distribute it with my program?
It usually comes standard with recent python versions. How are you trying to import it? And where did your python installation come from/what version and package did you use to install?
Using Tkinter is the most portable. Personally, I like wxPython. It uses the os's native widgets and is supported on Windows, Linux + GTK, and MacOS X.
import Tkinter works for me. I didn't install anything special. I'm using python 2.4
import Tkinter works for me. I didn't install anything special. I'm using python 2.4
I'm at work on Debian Linux (nope, nobody to help me at the moment). We have Python 2.3.5 and Python 2.4.1 installed... Yet, I just can't seem to get it to work...
You tell me it requires no particular installation, which is what I suspected (nobody seems to be suggesting it must be installed), but it strangely doesn't work. Perhaps this python installation is borked, in which case I will notify the local sysadmin, but it won't work on the remote windows 2000 server machines with python 2.2.2 either (although the fact that its so outdated might explain that).
Quote:~> python2.4
Python 2.4.1 (#2, May 5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named Tkinter
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named tkinter
>>> from TKinter import *
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named TKinter
>>> GOD DAMN YOU!
File "<stdin>", line 1
GOD DAMN YOU!
^
SyntaxError: invalid syntax
>>>
You tell me it requires no particular installation, which is what I suspected (nobody seems to be suggesting it must be installed), but it strangely doesn't work. Perhaps this python installation is borked, in which case I will notify the local sysadmin, but it won't work on the remote windows 2000 server machines with python 2.2.2 either (although the fact that its so outdated might explain that).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement