How to get Windows physical RAM using python?

Gisle Vanem giva at
Thu Jul 31 02:52:38 CEST 2003

"Dan Bishop" <danb_83 at> wrote:

> The easiest way is to parse the output from $WINDIR/system32/mem.exe .
>     memTotals = os.popen('mem | find "total"').readlines()
>     conventionalMemory = int(memTotals[0].split()[0])
>     extendedMemory = int(memTotals[1].split()[0])

Duh! That program reports the memory available to 16-bit


More information about the Python-list mailing list