Re: How to check if OS is unix or pc

2007-04-03 Thread kyosohma
On Apr 3, 4:12 pm, "bahoo" <[EMAIL PROTECTED]> wrote: > In Matlab, there is a "isunix" command. > Is there something similar in python? > > Thanks! > bahoo Check out the platform module. It should do what you need. The "release()" method is especially useful. Mike -- http://mail.python.org/mail

Re: How to check if OS is unix or pc

2007-04-03 Thread Bruno Desthuilliers
bahoo a écrit : > In Matlab, there is a "isunix" command. > Is there something similar in python? >>> import os >>> os.uname() ('Linux', 'bibi', '2.6.9', '#1 Sun Dec 5 14:54:12 CET 2004', 'i686') >>> os.name 'posix' >>> isunix = lambda: os.name == 'posix' >>> isunix() True Note that if you wo

How to check if OS is unix or pc

2007-04-03 Thread bahoo
In Matlab, there is a "isunix" command. Is there something similar in python? Thanks! bahoo -- http://mail.python.org/mailman/listinfo/python-list