win32api.GetSystemInfo gives wrong results 1 in 10 times

Gordon Williams g_will at cyberus.ca
Mon Oct 16 12:50:13 EDT 2000


Hi All,

When I ask for the system info through the win32api I get a wrong answer in
about 1 in 10 tries as shown below.  The last tuple is processor level and
processor revision.  I am assuming all these numbers will be constants from
one run to the next for a particular PC.

I'm using Python 1.5.2 and Pythonwin build 125 if that is any help.

Is this happening to anyone else and what can I do to work around it??

Regards,

Gordon Williams


>>> for x in range(10):
...  print win32api.GetSystemInfo()
...
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (65535, 65535))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
(0, 4096, 4194304, 2147483647, 1, 1, 586, 65536, (13796, 7702))
>>>




(from the docs)

The return value is a tuple of 9 values, which corresponds to the Win32
SYSTEM_INFO structure.  The element names are:
dwOemId
dwPageSize
lpMinimumApplicationAddress
lpMaximumApplicationAddress
, dwActiveProcessorMask
dwNumberOfProcessors
 dwProcessorType
dwAllocationGranularity
(wProcessorLevel,wProcessorRevision)





More information about the Python-list mailing list