what is the best way to determine system OS?

Robert Kern rkern at ucsd.edu
Mon Apr 25 10:13:34 EDT 2005


googleboy wrote:
> Hi there.
> 
> I am writing a little app tha tI would like to make cross-platform
> (debian, RH, Fedora, Solaris, AIX, etc)
> 
> Originally I decided to check what uname returned, as I didn't think it
> mattered beyond the detail of Linux or SunOS etc.
> 
> Recently I have learned that FC3 breaks my script,  so I need to be
> able to determine not simply "Linux" but to know exactly what unix the
> script is being run on.
> 
> What is the best way to determine this?

Look at the platform module.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter




More information about the Python-list mailing list