Its just http, I am using pylons. Right now I am doing tht with extra
parameter. But even if I get to know about the platform of the client
machine, I need to use the other properties of the corresponding
machine's os module. for example I need to use "os.path". So even if I
know about the platform name how to use that information to get os
module with the property of tht particular platform.<br><br><div class="gmail_quote">On Mon, Mar 2, 2009 at 2:31 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><div></div><div class="Wj3C7c">> On Mon, Mar 2, 2009 at 2:17 PM, Chris Rebert <<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>> wrote:<br>

>><br>
>> > 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<br>
>> >> > the<br>
>> >> > server machine is Linux. In program I want to use the OS module based<br>
>> >> > on<br>
>> >> > the<br>
>> >> > client's operating system. But when I do "import os" m only able to<br>
>> >> > 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>
>> 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<br>
>> > 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>
>> 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>
>><br>
>> Cheers,<br>
>> Chris<br>
<br>
</div></div><div class="Ih2E3d">On Mon, Mar 2, 2009 at 12:57 AM, M Kumar <<a href="mailto:tomanishkb@gmail.com">tomanishkb@gmail.com</a>> wrote:<br>
> Oh that might be the problem, I m new to this and new to this kind of<br>
> conversations. What you said was correct. But what I am looking for is, if<br>
> one client reqst comes I need to process the data which I got from the<br>
> client, so I need to use the os module. But since my program executes on the<br>
> server os.sys.platform has the value "linux2". What I want is a module<br>
</div>> having clients platform value for os.sys.platform. Any way to get that?> --<br>
<br>
How are you getting the request? HTTP? XML-RPC? SOAP? Something else altogether?<br>
If you have control of both the client and the server, it'd be easiest<br>
just to have the client include a parameter specifying what platform<br>
it is in its request to the server.<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>