Idle won't start

David MacQuigg dmq at gain.com
Mon Feb 23 19:36:57 EST 2004


On 22 Feb 2004 12:17:56 -0800, rmb25612 at yahoo.com (Richard James)
wrote:

>David MacQuigg <shuvit at 127.0.0.1> wrote in message news:<8eh830tlh056hk21hm9v49m3qcinjv4pq9 at 4ax.com>...

>> This might be a different problem if your problem is truly
>> intermittent, but I am finding that IDLE has conflicts with other
>> installed programs.  I have been running Python 2.3 under Windows
>> XP-Home with no problem for the last few months.  Yesterday I
>> installed Ruby 1.8.1-11 and now IDLE won't start.  No response to
>> clicking the icon, selecting the menu item,  Nada.  
>> 
>> With Ruby installed, when I run IDLE from a command line
>> C:\Python23\Lib\idlelib>idle.py
>> I get a message:
>> """
>> _tkinter.TclError: Cant find a usable init.tcl in the following
>> directories:  <c:\ruby\tcl\lib\tcl8.3> <c:\ruby\tcl\lib\tcl8.3>
>> c:/ruby/tcl/lib/tcl8.4  C:/Python23/lib/tcl8.4  C:/lib/tcl8.4
>> C:/library
>> This probably means that Tcl wasn't installed properly.
>> """
>> I have no idea why IDLE is looking for library routines in the Ruby
>> subdirectories, or why all the strange variations in the search path
>> above, but it is clear that Ruby and IDLE cannot co-exist on one
>> computer.
>> 
>> -- Dave
>
>The Ruby Windows Installer adds the following to your autoexec.bat
>file.
>
>--------
>
>REM Ruby Install -- do not edit this line
>set TCL_LIBRARY=c:\ruby\tcl\lib\tcl8.3
>set RUBY_TCL_DLL=c:\ruby\bin\tcl83.dll
>set RUBY_TK_DLL=c:\ruby\bin\tk83.dll
>set PATH="c:\ruby\bin;%PATH%"
>REM Ruby Install -- do not edit this line
>
>---------
>
>The key to the "problem" is in how TCL works. With the above
>statements in your autoexec.bat file. Every time your computer boots,
>the TCL_LIBRARY environment variable is set to the Ruby version.
>
>When Python Idle runs TCL, TCL uses the TCL_LIBRARY environmental
>variable to locate the "correct" version of the TCL library to use.
>TCL is doing what it is designed to do. And Ruby is using a legal TCL
>method to set it's path.

After doing a complete system restore, I have IDLE working correctly,
and there is nothing in my AUTOEXEC.BAT file ( i.e. file-size = 0 ).
I would blame the Ruby installer for this particular mess.  There may
be other problems with the way IDLE sets itself up, as discussed
elsewhere in this thread, but it seems to be running smoothly for me
now.

>With that Ruby version installed, Ruby uses an old TCL version that
>won't work with Python 2.3! When Ruby and Python distributions use the
>same version of TCL, Idle will work fine.
>
>I hate programs that change your autoexec.bat file "behind your back"
>because of hard to understand problems just like this one.

Until they solve this problem, Ruby is banned from my Windows system.
I'm trying it now on my Debian Linux system, which won't be so much of
a problem if it gets trashed.

>Sometimes the uninstall doesn't work right and your autoexec.bat file
>still sets TCL_LIBRARY to an old version even after Ruby is "removed".
>
>Other third party software packages also could be setting TCL_LIBRARY
>in the autoexec.bat file. I've also read that the TK_LIBRARY
>environmental variable can cause problems as well.

In the six months I have been running XP on both my desktop and my
laptop, I've had to restore the whole disk once on each system.  The
laptop was a system crash that made it look like a disk hardware
problem.  This failure to uninstall Ruby is a little surprising,
considering how smoothly Windows installs usually go using their
install wizard.

>Because of quirky TCL problems like this one, I've quit using TCL and
>TK and use Gui4Cli and it's optional g4c.pyd Python dll for quick one
>of a kind Python MS Windows programs. Gui4Cli is a script language
>that makes native MS Windows GUI's very simple to create. You can also
>use Gui4Cli to put a Windows GUI on dos command line programs or
>integrate it with your C/C++ programs.
>
>http://www.gui4cli.com
>
>I like using the WSciTE editor from the Scintilla project.
>
>http://www.scintilla.org/SciTE.html
>
>You type your Python code in the editor window, Press F5, and it
>displays your Python program output in a second window.
>(You insert temporary print statements to "debug" your code.)

I was never happy with Tk as a GUI toolkit, although I think it makes
sense as a freebie with Python, and with a little effort, you can make
a very nice GUI (e.g. IDLE itself).  I use Qt Designer for building
GUI's to run on either Windows or Linux, and the more I use it, the
more I like it.  This and IDLE and a little bit of glue make a killer
combo for cross-platform program development.

The glue is pyuic, which converts the XML from Qt Designer into
Python.  With a makefile, it is only a few seconds from saving your
changes in Designer back to editing code in IDLE.

Thanks for your insights on this problem.

-- Dave




More information about the Python-list mailing list