Oh that might be the problem, I m new to this and new to this kind of conversations. What you said was correct. But what I am looking for is, if one client reqst comes I need to process the data which I got from the client, so I need to use the os module. But since my program executes on the server os.sys.platform has the value "linux2". What I want is a module having clients platform value for os.sys.platform. Any way to get that?<br>
<br><div class="gmail_quote">On Mon, Mar 2, 2009 at 2:17 PM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">> On Mon, Mar 2, 2009 at 1:59 PM, Chris Rebert <<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>> wrote:<br>
>><br>
>> On Mon, Mar 2, 2009 at 12:26 AM, M Kumar <<a href="mailto:tomanishkb@gmail.com">tomanishkb@gmail.com</a>> wrote:<br>
>> ><br>
>> > Hi,<br>
>> ><br>
>> > I am writing a server side program, clients can be any machine but the<br>
>> > server machine is Linux. In program I want to use the OS module based on<br>
>> > the<br>
>> > client's operating system. But when I do "import os" m only able to get<br>
>> > the<br>
>> > module with the property of Linux. ANy idea how to import the module<br>
>> > with<br>
>> > the property of clients OS.<br>
>><br>
>> You want sys.platform; see<br>
>> <a href="http://docs.python.org/library/sys.html#sys.platform" target="_blank">http://docs.python.org/library/sys.html#sys.platform</a><br>
</div><div class="Ih2E3d">On Mon, Mar 2, 2009 at 12:43 AM, M Kumar <<a href="mailto:tomanishkb@gmail.com">tomanishkb@gmail.com</a>> wrote:<br>
> Hi Chris,<br>
> Thanks for quick and kind reply, but the python program runs on the server,<br>
> sys.platform is linux only. What I want is I need to get a module, which<br>
> shud be exactly same as if I import os module on the client machine<br>
<br>
</div>Um, you're not phrasing your request very clearly, so perhaps I'm not<br>
understanding what you're looking for, but I can tell you that<br>
sys.platform is certainly not Linux-only. If you'll read the docs I<br>
pointed you to, you'll see a table:<br>
System platform value<br>
Windows 'win32'<br>
<other entries snipped><br>
<div><div></div><div class="Wj3C7c"><br>
Cheers,<br>
Chris<br>
<br>
--<br>
Shameless self-promotion:<br>
<a href="http://blog.rebertia.com" target="_blank">http://blog.rebertia.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><br>Maneesh KB<br><br>Comat Technologies<br><br>Bangalore<br><br>Mob: 9740-192309<br><br> <br><br>We work with the underprivileged and in rural India. If you are interested to be a part of it, please mail or call me. I will be happy to share and inform - <a href="http://www.comat.com">http://www.comat.com</a> <br>