[IronPython] platform.system() == "cli"

Oren Held oren at held.org.il
Thu Jan 8 23:01:29 CET 2009


Hi,

In my code, I have a section which is not cross platform, thus I'm checking 
the OS name to call the matching OS-specific calls.

In all Unices, using platform.system() returned the OS name just fine. Is there 
a better way for getting the OS name on both CPython & IronPython?

10x!

 - Oren

On Thursday 08 January 2009 18:33:50 Curt Hagenlocher wrote:
> This is by design.  The platform is not the same as the operating system.
>  Jython does something similar.
> How are you trying to use this?
>
> On Thu, Jan 8, 2009 at 5:20 AM, Oren Held <oren at held.org.il> wrote:
> > Hi Guys,
> >
> > The following calls return "cli" instead of, what I would expect, "win32"
> > or
> > something simliar:
> > platform.system()
> > sys.platform
> >
> > I'm aware that it's not a new issue (it was mentioned here and there),
> > but I
> > still couldn't figure out why this behaviour is preserved.. Shouldn't it
> > be changed?
> >
> > 10x
> >
> >  - Oren
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list