[Python-talk] recognizing XP systems

Bill McGonigle bill at bfccomputing.com
Mon Apr 17 15:58:48 EDT 2006


On Apr 17, 2006, at 14:39, Ray Cote 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).
> --Ray

Bugger.  On 2k3:

('Microsoft', 'vm2k3', 'Windows', '5.2.3790', '', '')

[1] is the machine name.  Maybe [3] is reliable?

-----
Bill McGonigle, Owner           Work: 603.448.4440
BFC Computing, LLC              Home: 603.448.1668
bill at bfccomputing.com           Cell: 603.252.2606
http://www.bfccomputing.com/    Page: 603.442.1833
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf



More information about the Python-talk mailing list