How to detect my OS info?

Sean 'Shaleh' Perry shalehperry at
Wed Feb 26 05:01:24 CET 2003

On Tuesday 25 February 2003 19:36, Peter Wu wrote:
> Hello,
> I use Windows and FreeBSD interchangeably. I want to write a .signature
> script that can detect my OS respectively.
> Under FreeBSD, I can fire 'uname -rs' to get the information I need and
> under Windows, I may need to leverage 'ver' to get the info.
> Is there a one-stop solution from Python? I mean I just write one python
> script and it can work both on Windows and FreeBSD? Thanks.

>>> import os

you should get something like "winnt" under Windows.

More information about the Python-list mailing list