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
More information about the Python-list
mailing list