home *** CD-ROM | disk | FTP | other *** search
/ PC Extra 07 & 08 / pca1507.iso / Software / psp8 / Data1.cab / FixTk.py < prev    next >
Encoding:
Text File  |  2003-04-22  |  328 b   |  12 lines

  1. import sys, os, _tkinter
  2.  
  3. ver = str(_tkinter.TCL_VERSION)
  4. for t in "tcl", "tk", "tix":
  5.     key = t.upper() + "_LIBRARY"
  6.     try:
  7.         v = os.environ[key]
  8.     except KeyError:
  9.         v = os.path.join(sys.prefix, "tcl", t+ver)
  10.         if os.path.exists(os.path.join(v, "tclIndex")):
  11.             os.environ[key] = v
  12.