REPOST: Re: Python2.2 in Linux RH7.2 - Newbie

Tim Hammerquist tim at vegeta.ath.cx
Thu Dec 27 02:57:20 EST 2001


Ahimsa Consulting <ahimsa at inext.co.za> graced us by uttering:
> I am dealing with a double whammy here: I am new to both Python and
> Linux.  I have been able to call Python up in the Linux console
> in interactive mode i.e. '>>>'. I don't seem able to call up
> tkinter. Now I am probably doing something incorrectly. If someone
> could be kind enough to walk me through this process in baby steps
> bearing in mind my newbie status.

Without knowing what you're _actually_ doing, since you didn't tell
us, but here goes:

First, you don't mention which OS you used _before_ linux, so I'm
going to make a wild guess and say Windows. Windows is notable in
many things, one of which being that it is less case-sensitive than
some other operating systems.

Linux _is_ case-sensitive and will be less forgiving (or not at all)
if you type, say, 'import tkinter' at the '>>>' prompt, instead of
'Tkinter', which should load the Tkinter module if available.

In any case, here is a sample Tkinter session from my local
installation. If it works, your Tkinter works.

[tim at vegeta ~/vault/box]$ python
Python 2.2 (#1, Dec 22 2001, 22:09:44)
[GCC 2.95.3 19991030 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
>>> root = Tk()
>>> Label(root, text="Tkinter is working").pack()
>>> Button(root, text="Close", command=root.quit).pack()
>>> root.mainloop()
>>>

(After you click the "Close" button, you should be returned to the
'>>>' prompt.)

HTH
Tim Hammerquist
-- 
M-x induce-carpal-tunnel-syndrome
    -- Greg Bacon

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool1-nwblwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!newsfeed.direct.ca!look.ca!nntp.kreonet.re.kr!news-hub.kaist.ac.kr!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: Tim Hammerquist <tim at vegeta.ath.cx>
Newsgroups: comp.lang.python
Subject: cmsg cancel <slrna2ll2a.sjg.tim at vegeta.ath.cx>
Control: cancel <slrna2ll2a.sjg.tim at vegeta.ath.cx>
Date: Mon, 31 Dec 2001 04:36:36 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.slrna2ll2a.sjg.tim at vegeta.ath.cx>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009775883 27193 211.57.49.2 (31 Dec 2001 05:18:03 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:18:03 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list