def _syscmd_ver(system='', release='', version='', supported_platforms=('win32', 'win16', 'dos', 'os2')):
 if (sys.platform not in supported_platforms):
  return (system, release, version)
 for cmd in ('ver', 'command /c ver', 'cmd /c ver'):
  try:
   pipe = popen(cmd)
   info = pipe.read()
   if pipe.close():
    raise os.error, 'command failed'
  except os.error as why:
   continue
  except IOError as why:
   continue
  else:
   break
 else:
  return (system, release, version)
 info = string.strip(info)
 m = _ver_output.match(info)
 if (m is not None):
  (system, release, version) = m.groups()
  if (release[(-1)] == '.'):
   release = release[:(-1)]
  if (version[(-1)] == '.'):
   version = version[:(-1)]
  version = _norm_version(version)
 return (system, release, version)

def _syscmd_ver ( system = '' , release = '' , version = '' , supported_platforms = ( 'win32' , 'win16' , 'dos' , 'os2' ) ) : if ( sys . platform not in supported_platforms ) : return ( system , release , version ) for cmd in ( 'ver' , 'command /c ver' , 'cmd /c ver' ) : try : pipe = popen ( cmd ) info = pipe . read ( ) if pipe . close ( ) : raise os . error , 'command failed' except os . error as why : continue except IOError as why : continue else : break else : return ( system , release , version ) info = string . strip ( info ) m = _ver_output . match ( info ) if ( m is not None ) : ( system , release , version ) = m . groups ( ) if ( release [ ( - 1 ) ] == '.' ) : release = release [ : ( - 1 ) ] if ( version [ ( - 1 ) ] == '.' ) : version = version [ : ( - 1 ) ] version = _norm_version ( version ) return ( system , release , version )
tries to figure out the os version used and returns a tuple .