def _find_tcl_tk_dir():
 tcl_root = exec_statement(('from %s import Tcl; print(Tcl().eval("info library"))' % modname_tkinter))
 tk_version = exec_statement('from _tkinter import TK_VERSION; print(TK_VERSION)')
 tk_root = os.path.join(os.path.dirname(tcl_root), ('tk%s' % tk_version))
 return (tcl_root, tk_root)

def _find_tcl_tk_dir ( ) : tcl_root = exec_statement ( ( 'from %s import Tcl; print(Tcl().eval("info library"))' % modname_tkinter ) ) tk_version = exec_statement ( 'from _tkinter import TK_VERSION; print(TK_VERSION)' ) tk_root = os . path . join ( os . path . dirname ( tcl_root ) , ( 'tk%s' % tk_version ) ) return ( tcl_root , tk_root )
get a platform-agnostic 2-tuple of the absolute paths of the top-level external data directories for both tcl and tk .