[Python-talk] recognizing XP systems
Ben Scott
dragonhawk at gmail.com
Mon Apr 17 17:14:22 EDT 2006
On 4/17/06, Lloyd Kvam <lkvam at venix.com> wrote:
>>> Try platform.uname()
>>> Returns a tuple, third element of which says 'XP' and fourth element
>>> of which is 5.1.2600 (at least on my machine).
>>
>> Bugger. On 2k3:
>>
>> ('Microsoft', 'vm2k3', 'Windows', '5.2.3790', '', '')
>
> That is unfortunate, but not an issue for the moment.
Famous last words. :)
> Perhaps I should be using [3], the version number.
I was curious, so I Googled. It appears the "platform" module
itself has had some inconsistencies in the past, and your results may
also depend on your specific Windows environment (now there's a
surprise).
http://www.google.com/search?q=python+xp+%22platform.uname%22
-- Ben
More information about the Python-talk
mailing list