def _collect_tcl_tk_files(hook_api):
 _handle_broken_tcl_tk()
 (tcl_root, tk_root) = _find_tcl_tk(hook_api)
 if (not tcl_root):
  logger.error('Tcl/Tk improperly installed on this system.')
  return []
 if (not os.path.isdir(tcl_root)):
  logger.error('Tcl data directory "%s" not found.', tcl_root)
  return []
 if (not os.path.isdir(tk_root)):
  logger.error('Tk data directory "%s" not found.', tk_root)
  return []
 tcltree = Tree(tcl_root, prefix='tcl', excludes=['demos', '*.lib', 'tclConfig.sh'])
 tktree = Tree(tk_root, prefix='tk', excludes=['demos', '*.lib', 'tkConfig.sh'])
 if is_darwin:
  _warn_if_activetcl_or_teapot_installed(tcl_root, tcltree)
 return (tcltree + tktree)

def _collect_tcl_tk_files ( hook_api ) : _handle_broken_tcl_tk ( ) ( tcl_root , tk_root ) = _find_tcl_tk ( hook_api ) if ( not tcl_root ) : logger . error ( 'Tcl/Tk improperly installed on this system.' ) return [ ] if ( not os . path . isdir ( tcl_root ) ) : logger . error ( 'Tcl data directory "%s" not found.' , tcl_root ) return [ ] if ( not os . path . isdir ( tk_root ) ) : logger . error ( 'Tk data directory "%s" not found.' , tk_root ) return [ ] tcltree = Tree ( tcl_root , prefix = 'tcl' , excludes = [ 'demos' , '*.lib' , 'tclConfig.sh' ] ) tktree = Tree ( tk_root , prefix = 'tk' , excludes = [ 'demos' , '*.lib' , 'tkConfig.sh' ] ) if is_darwin : _warn_if_activetcl_or_teapot_installed ( tcl_root , tcltree ) return ( tcltree + tktree )
get a list of toc-style 3-tuples describing all external tcl/tk data files .