[Tutor] idle or lack thereof

Thomas Rivas trivas7@rawbw.com
Tue Dec 31 19:29:04 2002


On Tuesday 31 December 2002 09:00 am, tutor-request@python.org wrote:

> From: ahimsa <ahimsa@onetel.net.uk>
> To: tutor@python.org
> Date: 31 Dec 2002 11:32:55 +0000
> Subject: [Tutor] idle or lack thereof ...
>
> Hi again
> I'm sorry to keep going on about this idle, but I must be having a brain
> fugue or some such 'cos I seem to be having a really hard time figuring
> this out. I followed up on a suggestion and found 'idle' buried within
> the Tools sub-directory. When I went to go and call it this is the
> output.
> ________
>
> [ahimsa@localhost ahimsa]$ /usr/lib/python2.2/Tools/idle/idle.py
> Traceback (most recent call last):
>   File "/usr/lib/python2.2/Tools/idle/idle.py", line 3, in ?
>     import PyShell
>   File "/usr/lib/python2.2/Tools/idle/PyShell.py", line 13, in ?
>     from Tkinter import *
>   File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 35, in ?
>     import _tkinter # If this fails your Python may not be configured
> for Tk
> ImportError: No module named _tkinter
> [ahimsa@localhost ahimsa]$
> _______
>
> Could someone give me a couple of suggestions how to "configure" python
> for Tk please.
>
> Thanks (once again) :)
>
> AmF


Ahimsa--

Looking at the last line in your traceback("import Error: No module named 
_tkinter") I suspect you don't have the tk and tcl libraries on your system. 
Under KPackage on Mandrake 9.0 tk is installed as an rpm (Red Hat Package 
Manager) package  under the libraries section described as "Tk GUI toolkit 
for Tcl" (which is also installed in the same libraries section as tcl), and 
" a X Windows widget set designed to work closely with the tcl scripting 
language." IDLE comes with the Python installation; I invoke it by typing 
"idle" at the command line (well, actually I use the Python-headed icon I put 
on my KDE panel) Make sure you have these two libraries installed on your 
system.

Thomas Rivas
-- 
Simplicity does not proceed complexity, but follows it.--A. Perlis