Re: os.name under Win32

2006-09-13 Thread Martin v. Löwis
Igor Kravtchenko schrieb: > Recently, someone advised me to use instead: > platform.system() > > that returns only 3 different strings: Java, Linux or Windows. End of > story. That's not true: ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on Python 2.4.1 (#1, Jun 20 2005, 17:18:51) [C]

Re: os.name under Win32

2006-09-13 Thread Igor Kravtchenko
Hi again, I get back to this old "thread". sys.platform returns indeed "win32" under Windows. os.name should return "posix" even under Windows if we are under Cygwin as Martin suggested. Recently, someone advised me to use instead: platform.system() that returns only 3 different strings: Java

Re: os.name under Win32

2006-09-09 Thread Steve Holden
Martin v. Löwis wrote: > Igor Kravtchenko schrieb: > >>My question is whether that is supposed to be totally impossible. >>Under Win32, we are indeed supposed to have os.name = "nt". Is that value >>hardcoded in Win32 binaries distribution themself? Can it potentially >>change? > > > I can't t

Re: os.name under Win32

2006-09-09 Thread Martin v. Löwis
Igor Kravtchenko schrieb: > My question is whether that is supposed to be totally impossible. > Under Win32, we are indeed supposed to have os.name = "nt". Is that value > hardcoded in Win32 binaries distribution themself? Can it potentially > change? I can't test it right now, but I would expec

Re: os.name under Win32

2006-09-01 Thread Igor Kravtchenko
Hi Fredrik, yes I've checked and I'm sure we don't assign os.name somewhere ourself. I'll replace os.name == "posix" with sys.platform == "win32" as you suggested and see how thing goes. Thanks for your help, Igor. Fredrik Lundh wrote: >Igor Kravtchenko wrote: > > > >>We have an applicatio

Re: os.name under Win32

2006-09-01 Thread Fredrik Lundh
Igor Kravtchenko wrote: > We have an application using Python that is intended to work both under > Win32 and Linux. > Since some parts of the code need to be different depending whether we > are under Win32 > or Linux, we use the traditional: > > if os.name == "posix": > some Linux code > el

os.name under Win32

2006-09-01 Thread Igor Kravtchenko
Hi! We have an application using Python that is intended to work both under Win32 and Linux. Since some parts of the code need to be different depending whether we are under Win32 or Linux, we use the traditional: if os.name == "posix": some Linux code else: some Win32 code However, we hav