Re: Running different codes for different systems
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Running different codes for different systems
- From: Dirk Laurie <dpl@...>
- Date: Thu, 6 Jan 2011 07:47:47 +0200
On Wed, Jan 05, 2011 at 03:15:11PM +0200, Jerome Vuarand wrote:
> 2011年1月5日 luciano de souza <luchyanus@gmail.com>:
> > I imagined I would get it with a command like "os.getenv('system') ==
> > 'windows'", but there is no a environment variable called 'system'.
> >
> > What do you suggest?
>
> There is an "OS" environment variable on recent Windows, which content
> is "Windows_NT". That's what I use when I need to do platform-specific
> stuff.
>
On Ubuntu Lucid, there is "OSTYPE", with value "linux-gnu".
Dirk