Jump to content
  • Advertisement
Sign in to follow this  
Max_Payne

Python GUI Programming?

This topic is 4863 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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...

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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!