def KernelVersion():
 rtl_osversioninfoexw = RtlOSVersionInfoExw()
 try:
  RtlGetVersion(rtl_osversioninfoexw)
 except exceptions.WindowsError:
  return 'unknown'
 return ('%d.%d.%d' % (rtl_osversioninfoexw.dwMajorVersion, rtl_osversioninfoexw.dwMinorVersion, rtl_osversioninfoexw.dwBuildNumber))

def KernelVersion ( ) : rtl_osversioninfoexw = RtlOSVersionInfoExw ( ) try : RtlGetVersion ( rtl_osversioninfoexw ) except exceptions . WindowsError : return 'unknown' return ( '%d.%d.%d' % ( rtl_osversioninfoexw . dwMajorVersion , rtl_osversioninfoexw . dwMinorVersion , rtl_osversioninfoexw . dwBuildNumber ) )
gets the kernel version as string .