您将要使用wmi模块。像这样:
import wmicomp = wmi.WMI()for i in comp.Win32_ComputerSystem(): print i.TotalPhysicalMemory, "bytes of physical memory"for os in comp.Win32_OperatingSystem(): print os.FreePhysicalMemory, "bytes of available memory"

您将要使用wmi模块。像这样:
import wmicomp = wmi.WMI()for i in comp.Win32_ComputerSystem(): print i.TotalPhysicalMemory, "bytes of physical memory"for os in comp.Win32_OperatingSystem(): print os.FreePhysicalMemory, "bytes of available memory"