How to get Windows physical RAM using python?
Gisle Vanem
giva at users.sourceforge.net
Wed Jul 30 20:52:38 EDT 2003
"Dan Bishop" <danb_83 at yahoo.com> 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
programs.
--gv
More information about the Python-list
mailing list