os module

Chris Rebert clp2 at rebertia.com
Mon Mar 2 09:29:53 CET 2009

On Mon, Mar 2, 2009 at 12:26 AM, M Kumar <tomanishkb at gmail.com> wrote:
> Hi,
> I am writing a server side program, clients can be any machine but the
> server machine is Linux. In program I want to use the OS module based on the
> client's operating system. But when I do "import os" m only able to get the
> module with the property of Linux. ANy idea how to import the module with
> the property of clients OS.

You want sys.platform; see http://docs.python.org/library/sys.html#sys.platform


Shameless self-promotion:

More information about the Python-list mailing list