tkinter problems

Jason Cole cole at ccdc.cam.ac.uk
Mon Jan 24 11:42:43 EST 2000


Hi All,
	I'm sure you all think this is yet another example of someone not being 
able to figure out how to edit autoexec.bat on Windows 95, but we a
bizarre problem
to do with good old "init.tcl" and tkinter (I found > 100 messages about
this when
searching comp.lang.python, so I'm scared I may not be seeing wood for
trees %)

	We have an installation script that attempts to install Tcl/Tk, and
it makes some edits to autoexec.bat: If it encounters the environment
variable TCL_LIBRARY
in the current autoexec.bat, it doesn't overwrite it, but appends the
new search path
into the environment variable, i.e. say it contained (as ours does ...
;-)

SET TCL_LIBRARY=C:\PROGRA~1\OTHER_APPLICATION\TCL\LIB\TCL8.0

then the install code would then add another line as follows after the
first one

SET
TCL_LIBRARY=%TCL_LIBRARY%;C:\PROGRA~1\CCDC\CONQUEST_NEW\TCL\LIB\TCL8.0

Now, it seems that when we do this, we get a message as follows

Traceback (innermost last):
  File "lib\csds.py", line 560, in ?
    a = New()
  File "lib\csds.py", line 31, in __init__
    Tk.__init__(self, parent)
  File "C:\PROGRAM FILES\CCDC\CONQUEST\PYTHON\lib\lib-tk\Tkinter.py",
line 886,
in __init__
    self.tk = _tkinter.create(screenName, baseName, className)
TclError: Can't find a usable init.tcl in the following directories:
   
{C:\PROGRA~1\OTHER_APPLICATION\TCL\LIB\TCL8.0;C:\PROGRA~1\CCDC\CONQUEST_NEW\TCL\LIB\
TCL8.0} {} ./lib/tcl8.0 ./lib/tcl8.0 ./library ./library
./tcl8.0/library ./tcl8
.0/library

It would seem to us that tkinter does not break up the path in the
conventional way, but
treats the semi-colon concatenated list as a single entity .... is this
the case? If so,
why, and what is the alternative to using this method. (we'd really like
to sandbox our
tcl/tk on Windows95 from other junk that may or may not be present in
the system, like
you can do for unix systems, but we're not sure how to do this in a
*sophisticated* way)

Jason Cole & Ian Bruno



More information about the Python-list mailing list