def getTclTkVersion(configfile, versionline):
 try:
  f = open(configfile, 'r')
 except OSError:
  fatal(('Framework configuration file not found: %s' % configfile))
 for l in f:
  if l.startswith(versionline):
   f.close()
   return l
 fatal(('Version variable %s not found in framework configuration file: %s' % (versionline, configfile)))

def getTclTkVersion ( configfile , versionline ) : try : f = open ( configfile , 'r' ) except OSError : fatal ( ( 'Framework configuration file not found: %s' % configfile ) ) for l in f : if l . startswith ( versionline ) : f . close ( ) return l fatal ( ( 'Version variable %s not found in framework configuration file: %s' % ( versionline , configfile ) ) )
search tcl or tk configuration file for version line .