Tcl/Tkinter problem

Xiao-Qin Xia xx758 at cam.ac.uk
Mon Oct 7 05:25:28 EDT 2002


Hi,

After installed a Chinese ttf font, Tkinter for Python2.2 cannot work 
anymore:
"""
[xqxia at mwise1 xqxia]$ python
Python 2.2 (#2, Aug 21 2002, 16:22:49) 
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
>>> r = Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1487, in __init__
    self.tk = _tkinter.create(screenName, baseName, className)
TclError: Can't find a usable init.tcl in the following directories: 
    /usr/lib/tcl8.3 / $(Af              g  g?%f   (B.3 / $(Af           f

This probably means that Tcl wasn't installed properly.
"""

and wish faces the samilar problem:
"""
[xqxia at mwise1 tcl8.3]$ wish 
#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?
#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?
#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?
#?#?#?#?#?#?#?#?#?#?#?#?#?#?usr/lib/tcl8#?#?#?#?lib/tcl8#?#?#?#?lib/tcl8
#?3/librar#?#?#?librar#?#?#?tcl8#?3/librar#?#?#?usr/lib/tcl8#?#?#?#?
#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?@(#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?
#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?
#?#?#?#?#?#?#?#?#?#?#?#?#?[xqxia at mwise1 tcl8.3]$ 
"""

but the Tkinter of python1.5 or pythonworks can work properly.

If I rename the directory /usr/lib/tcl8.3 and /usr/lib/tk8.3 to anything 
other, python1.5 cannot use Tkinter either. So I guess python1.5 and 
python2.2 use the same Tk library. But why they behavior different? Does 
anybody know how to solve this problem?

Cheers,
Xiao-Qin



More information about the Python-list mailing list