import sys, os
v = os.path.join(sys.prefix, "tcl", "tcl8.3")
if os.path.exists(os.path.join(v, "init.tcl")):
    os.environ["TCL_LIBRARY"] = v

import sys, os, _tkinter
ver = str(_tkinter.TCL_VERSION)
v = os.path.join(sys.prefix, "tcl", "tcl"+ver)
if os.path.exists(os.path.join(v, "init.tcl")):
    os.environ["TCL_LIBRARY"] = v

Work the Tcl version number in the path we search for.
Work the Tcl version number in the path we search for.

- import sys, os
+ import sys, os, _tkinter
+ ver = str(_tkinter.TCL_VERSION)
- v = os.path.join(sys.prefix, "tcl", "tcl8.3")
+ v = os.path.join(sys.prefix, "tcl", "tcl"+ver)
  if os.path.exists(os.path.join(v, "init.tcl")):
      os.environ["TCL_LIBRARY"] = v
  
Work the Tcl version number in the path we search for.
## Code Before:
import sys, os
v = os.path.join(sys.prefix, "tcl", "tcl8.3")
if os.path.exists(os.path.join(v, "init.tcl")):
    os.environ["TCL_LIBRARY"] = v

## Instruction:
Work the Tcl version number in the path we search for.
## Code After:
import sys, os, _tkinter
ver = str(_tkinter.TCL_VERSION)
v = os.path.join(sys.prefix, "tcl", "tcl"+ver)
if os.path.exists(os.path.join(v, "init.tcl")):
    os.environ["TCL_LIBRARY"] = v
