def windows_variant():
 from win32api import GetVersionEx
 from win32con import VER_PLATFORM_WIN32_NT
 import _winreg
 vista_plus = x64 = False
 (maj, _minor, _buildno, plat, _csd) = GetVersionEx()
 if (plat == VER_PLATFORM_WIN32_NT):
  vista_plus = (maj > 5)
  if vista_plus:
   key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment')
   for n in xrange(_winreg.QueryInfoKey(key)[1]):
    (name, value, _val_type) = _winreg.EnumValue(key, n)
    if (name == 'PROCESSOR_ARCHITECTURE'):
     x64 = (value.upper() == u'AMD64')
     break
   _winreg.CloseKey(key)
 return (vista_plus, x64)

def windows_variant ( ) : from win32api import GetVersionEx from win32con import VER_PLATFORM_WIN32_NT import _winreg vista_plus = x64 = False ( maj , _minor , _buildno , plat , _csd ) = GetVersionEx ( ) if ( plat == VER_PLATFORM_WIN32_NT ) : vista_plus = ( maj > 5 ) if vista_plus : key = _winreg . OpenKey ( _winreg . HKEY_LOCAL_MACHINE , 'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' ) for n in xrange ( _winreg . QueryInfoKey ( key ) [ 1 ] ) : ( name , value , _val_type ) = _winreg . EnumValue ( key , n ) if ( name == 'PROCESSOR_ARCHITECTURE' ) : x64 = ( value . upper ( ) == u'AMD64' ) break _winreg . CloseKey ( key ) return ( vista_plus , x64 )
determine windows variant return vista_plus .