Re: SimpleXMLRPCServer and client address

2010-02-11 Thread Jean-Michel Pichavant
Stephen Hansen wrote: On Wed, Feb 10, 2010 at 5:36 PM, Jean-Michel Pichavant mailto:jeanmic...@sequans.com>> wrote: I don't know exactly what you are trying to do, but if your server requires informations from the client, it would be better to ask explicitly the client for those inf

Re: SimpleXMLRPCServer and client address

2010-02-10 Thread Gabriel Genellina
En Wed, 10 Feb 2010 19:19:50 -0300, Jordan Apgar escribió: I'm trying to right a server that needs specific information for each client accessing it. The easiest way I could think of doing this is keeping this information based on ip address (the information is only valid for a short time).

Re: SimpleXMLRPCServer and client address

2010-02-10 Thread Stephen Hansen
On Wed, Feb 10, 2010 at 5:36 PM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > I don't know exactly what you are trying to do, but if your server requires > informations from the client, it would be better to ask explicitly the > client for those informations. > For instance, if a metho

Re: SimpleXMLRPCServer and client address

2010-02-10 Thread Jean-Michel Pichavant
Jordan Apgar wrote: I'm trying to right a server that needs specific information for each client accessing it. The easiest way I could think of doing this is keeping this information based on ip address (the information is only valid for a short time). I know there is no was to get the client's

Re: SimpleXMLRPCServer daemon

2010-02-01 Thread Jean-Michel Pichavant
Gabriel Genellina wrote: En Fri, 29 Jan 2010 12:54:23 -0300, Thomas Allen escribió: I have a script that runs an instance of SimpleXMLRPCServer and in general it works as expected. In its __del__, it is supposed to clean up its PID file (written on boot). I have two problems with this server

Re: SimpleXMLRPCServer daemon

2010-01-29 Thread Gabriel Genellina
En Fri, 29 Jan 2010 12:54:23 -0300, Thomas Allen escribió: I have a script that runs an instance of SimpleXMLRPCServer and in general it works as expected. In its __del__, it is supposed to clean up its PID file (written on boot). I have two problems with this server instance: The first is th

Re: SimpleXMLRPCServer daemon

2010-01-29 Thread Sean DiZazzo
On Jan 29, 7:54 am, Thomas Allen wrote: > I have a script that runs an instance of SimpleXMLRPCServer and in > general it works as expected. In its __del__, it is supposed to clean > up its PID file (written on boot). I have two problems with this > server instance: The first is that tt doesn't al

Re: SimpleXMLRPCServer daemon

2010-01-29 Thread Tim Wintle
On Fri, 2010-01-29 at 07:54 -0800, Thomas Allen wrote: > The second is that when it does crash, I don't know about it...what > would be sufficient as a "keep-alive" script to restart it? I suppose > I could use something like EventMachine (already installed on my > server) to watch the PID file if

Re: SimpleXMLRPCServer daemon

2010-01-29 Thread Adam Tauno Williams
On Fri, 2010-01-29 at 07:54 -0800, Thomas Allen wrote: > I have a script that runs an instance of SimpleXMLRPCServer and in > general it works as expected. In its __del__, it is supposed to clean > up its PID file (written on boot). I have two problems with this > server instance: The first is that

Re: SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-21 Thread Brian Quinlan
Do you have some code that we could see that provokes the problem? Cheers, Brian Joseph Turian wrote: I was having a mysterious problem with SimpleXMLRPCServer. (I am using Python 2.5.2) The request handlers were sometimes failing without any error message to the log output. What I discovered

Re: SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-20 Thread Gabriel Genellina
En Mon, 19 Oct 2009 00:09:10 -0300, Joseph Turian escribió: > I was having a mysterious problem with SimpleXMLRPCServer. (I am using > Python 2.5.2) > The request handlers were sometimes failing without any error message > to the log output. Here's what I see: * If I use logging to write the

Re: SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-18 Thread Joseph Turian
> Here's what I see: > * If I use logging to write the output, I don't see any output in the > server log, but the client gets correct results. > * If I use sys.stderrto write the output, I don't see any output in > the server log AND the client gets INcorrect results. > * If I use sys.stdout to w

Re: SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-18 Thread Joseph Turian
> > I was having a mysterious problem with SimpleXMLRPCServer. (I am using > > Python 2.5.2) > > I'd start updating Python to the latest 2.5 release: 2.5.4 Ubuntu doesn't have 2.5.4. :( > > The request handlers were sometimes failing without any error message > > to the log output. > > > What I d

Re: SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-17 Thread Gabriel Genellina
En Sat, 17 Oct 2009 23:54:23 -0300, Joseph Turian escribió: I was having a mysterious problem with SimpleXMLRPCServer. (I am using Python 2.5.2) I'd start updating Python to the latest 2.5 release: 2.5.4 The request handlers were sometimes failing without any error message to the log outp

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-10 Thread Martin P. Hellwig
Piet van Oostrum wrote: goo...@smetj.net (g) wrote: g> Well, I think Martin's example will suit my needs. g> Thanks for the explanation! His client code is unnecessarily complicated with 3 session variables. The following code does the same: SESSION = xmlrpclib.ServerProxy(URL_PORT)

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-09 Thread Piet van Oostrum
> goo...@smetj.net (g) wrote: >g> Well, I think Martin's example will suit my needs. >g> Thanks for the explanation! His client code is unnecessarily complicated with 3 session variables. The following code does the same: SESSION = xmlrpclib.ServerProxy(URL_PORT) print(SESSION.show_

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-09 Thread google
On May 8, 1:17 am, Piet van Oostrum wrote: > > Jelle Smet (JS) wrote: > > One more thing: > > >JS> I start python interactively: > > import xmlrpclib > > session1=xmlrpclib.ServerProxy('http://localhost:8000') > > session2=xmlrpclib.ServerProxy('http://localhost:8000') > > pri

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-08 Thread Piet van Oostrum
> Piet van Oostrum (PvO) wrote: > Jelle Smet (JS) wrote: >PvO> One more thing: >JS> I start python interactively: > import xmlrpclib > session1=xmlrpclib.ServerProxy('http://localhost:8000') > session2=xmlrpclib.ServerProxy('http://localhost:8000') > print session1.show_

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-08 Thread Piet van Oostrum
> Jelle Smet (JS) wrote: One more thing: >JS> I start python interactively: > import xmlrpclib > session1=xmlrpclib.ServerProxy('http://localhost:8000') > session2=xmlrpclib.ServerProxy('http://localhost:8000') > print session1.show_random() >JS> 13930 > print session2.sh

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-07 Thread Piet van Oostrum
> Jelle Smet (JS) wrote: >JS> Hi list, >JS> My goals is to have concurrent and separated client sessions using xmlrpc. >JS> Initially my though was that SimpleXMLRPCServer was able to create a new >JS> object instance for each incoming request. >JS> But this doesn't appear to be the case, un

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-06 Thread Martin P. Hellwig
Jelle Smet wrote: Hi list, My goals is to have concurrent and separated client sessions using xmlrpc. Initially my though was that SimpleXMLRPCServer was able to create a new object instance for each incoming request. But this doesn't appear to be the case, unless I'm overlooking something, if s

Re: SimpleXMLRPCServer question

2009-02-01 Thread flagg
On Feb 1, 12:38 am, "Hendrik van Rooyen" wrote: >  "flagg" wrote: > >Let me see if i can elaborate on the requirements.  I have 20+ > >different zone files.  I want the xmlrpc server to be able to > >determine what zone file to open by looking at the incoming xml > >request.  For example one of t

Re: SimpleXMLRPCServer question

2009-02-01 Thread Hendrik van Rooyen
"flagg" wrote: >Let me see if i can elaborate on the requirements. I have 20+ >different zone files. I want the xmlrpc server to be able to >determine what zone file to open by looking at the incoming xml >request. For example one of the functions I have now is to show a DNS >record (I am u

Re: SimpleXMLRPCServer question

2009-01-31 Thread rdmurray
Quoth flagg : > Let me see if i can elaborate on the requirements. I have 20+ > different zone files. I want the xmlrpc server to be able to > determine what zone file to open by looking at the incoming xml > request. For example one of the functions I have now is to show a DNS > record (I am us

Re: SimpleXMLRPCServer question

2009-01-31 Thread flagg
On Jan 30, 8:12 pm, rdmur...@bitdance.com wrote: > Quoth flagg : > > > I am working on a very basic xmlrpc server, which will expose certain > > functions for administering BIND zone files.  The big problem I am > > having is parsing the incoming xmlrpc request.  Basically part of the > > xmlrpc re

Re: SimpleXMLRPCServer question

2009-01-31 Thread andrew cooke
On Jan 30, 11:59 pm, flagg wrote: > I am working on a very basic xmlrpc server, which will expose certain > functions for administering BIND zone files.  The big problem I am > having is parsing the incoming xmlrpc request.  Basically part of the [...] at the risk of repeating what the other guy

Re: SimpleXmlRpcServer and character encoding

2008-10-09 Thread Diez B. Roggisch
shymon wrote: > > > > Diez B. Roggisch-2 wrote: >> >> shymon wrote: >> >>> I'm using SimpleXmlRpcServer class. Although I set encoding parameter in >>> the constructor, I have to return all strings in default platform >>> encoding >>> (windows-1250/win32 or iso-8859-2/linux in my case). When

Re: SimpleXmlRpcServer and character encoding

2008-10-09 Thread shymon
Diez B. Roggisch-2 wrote: > > shymon wrote: > >> I'm using SimpleXmlRpcServer class. Although I set encoding parameter in >> the constructor, I have to return all strings in default platform >> encoding >> (windows-1250/win32 or iso-8859-2/linux in my case). When I send values >> in, for examp

Re: SimpleXmlRpcServer and character encoding

2008-10-09 Thread Diez B. Roggisch
shymon wrote: > > > I'm using SimpleXmlRpcServer class. Although I set encoding parameter in > the constructor, I have to return all strings in default platform encoding > (windows-1250/win32 or iso-8859-2/linux in my case). When I send values > in, for example, UTF-8, string received by client

Re: SimpleXMLRPCServer -- turning off request log?

2008-10-03 Thread mh
Vinay Sajip <[EMAIL PROTECTED]> wrote: > Did you try setting logRequests to false? Perfect, that's just what I needed. Thanks Vinay!! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleXMLRPCServer -- turning off request log?

2008-09-26 Thread Vinay Sajip
On Sep 26, 2:01 am, [EMAIL PROTECTED] wrote: > My SimpleXMLRPCServer program prints to stderr a line like > this for each request: > > ohm..pixar.com - - [25/Sep/2008 17:57:50] "POST /RPC2 HTTP/1.0" 200 - > > Is there a way to turn thisloggingoff? I have RTFM and can't > seem to find a way to do s

Re: SimpleXMLRPCServer -- turning off request log?

2008-09-25 Thread Sean DiZazzo
On Sep 25, 9:04 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > On Sep 25, 6:01 pm, [EMAIL PROTECTED] wrote: > > > My SimpleXMLRPCServer program prints to stderr a line like > > this for each request: > > > ohm..pixar.com - - [25/Sep/2008 17:57:50] "POST /RPC2 HTTP/1.0" 200 - > > > Is there a way to

Re: SimpleXMLRPCServer -- turning off request log?

2008-09-25 Thread Sean DiZazzo
On Sep 25, 6:01 pm, [EMAIL PROTECTED] wrote: > My SimpleXMLRPCServer program prints to stderr a line like > this for each request: > > ohm..pixar.com - - [25/Sep/2008 17:57:50] "POST /RPC2 HTTP/1.0" 200 - > > Is there a way to turn this logging off?  I have RTFM and can't > seem to find a way to do

Re: SimpleXMLRPCServer to fastcgi via WSGI?

2008-02-01 Thread Joshua Kugler
Ivan Voras wrote: > Is there a straightforward way to convert an XML-RPC server application > (written for SimpleXMLRPCServer) to use WSGI so that it can be used as s > fastcgi server? By "straightforward" I mean something simple, without > using some external framework. > > Alternatively, I don't

Re: SimpleXMLRPCServer interruptable?

2007-12-10 Thread Bret
On Dec 6, 7:43 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 06 Dec 2007 13:11:09 -0300, Bret <[EMAIL PROTECTED]> escribió: > > > > > For completeness, what I ended up doing is this: > > > server = SimpleXMLRPCServer((host, port)) > > server.socket.settimeout(0.1) > > > Serve

Re: SimpleXMLRPCServer interruptable?

2007-12-06 Thread Gabriel Genellina
En Thu, 06 Dec 2007 13:11:09 -0300, Bret <[EMAIL PROTECTED]> escribió: > For completeness, what I ended up doing is this: > > server = SimpleXMLRPCServer((host, port)) > server.socket.settimeout(0.1) > > ServerWrapper became: > > def ServerWrapper(): > while True: >

Re: SimpleXMLRPCServer interruptable?

2007-12-06 Thread Bret
On Dec 6, 7:04 am, Bret <[EMAIL PROTECTED]> wrote: > On Dec 5, 10:00 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > > > > > On Dec 5, 10:19 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > > > > On Dec 5, 6:22 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > En Wed, 05 Dec 2007 18:2

Re: SimpleXMLRPCServer interruptable?

2007-12-06 Thread Bret
On Dec 6, 7:04 am, Bret <[EMAIL PROTECTED]> wrote: > On Dec 5, 10:00 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > > > > > On Dec 5, 10:19 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > > > > On Dec 5, 6:22 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > En Wed, 05 Dec 2007 18:2

Re: SimpleXMLRPCServer interruptable?

2007-12-06 Thread Bret
On Dec 5, 10:00 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > On Dec 5, 10:19 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > > > > > On Dec 5, 6:22 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > En Wed, 05 Dec 2007 18:20:35 -0300, Bret <[EMAIL PROTECTED]> escribió: > > > > > I ju

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Edward Kozlowski
On Dec 5, 10:19 pm, Edward Kozlowski <[EMAIL PROTECTED]> wrote: > On Dec 5, 6:22 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > En Wed, 05 Dec 2007 18:20:35 -0300, Bret <[EMAIL PROTECTED]> escribió: > > > > I just tried changing this so that I now have a threading.Event() > > > called

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Edward Kozlowski
On Dec 5, 6:22 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 05 Dec 2007 18:20:35 -0300, Bret <[EMAIL PROTECTED]> escribió: > > > I just tried changing this so that I now have a threading.Event() > > called self.done, which is set within the body of the shutdown() > > method. The se

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Gabriel Genellina
En Wed, 05 Dec 2007 18:20:35 -0300, Bret <[EMAIL PROTECTED]> escribió: > I just tried changing this so that I now have a threading.Event() > called self.done, which is set within the body of the shutdown() > method. The serverWrapper loop now looks like this: > > def serverWrapper(): > while

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Bret
I just tried changing this so that I now have a threading.Event() called self.done, which is set within the body of the shutdown() method. The serverWrapper loop now looks like this: def serverWrapper(): while True: server.handle_request() if self.done.isSet(): bre

Re: SimpleXMLRPCServer - client address

2007-04-02 Thread c james
Jan Danielsson wrote: > Hello all, > >I writing an application based on the SimpleXMLRPCServer class. I > would like to know the IP address of the client performing the RPC. Is > that possible, without having to abandon the SimpleXMLRPCServer class? > I did this a long time ago so it's not li

Re: SimpleXMLRPCServer and Threading

2007-03-29 Thread Jeff McNeil
I'd have to go dig into the library code again as I haven't been in there since I did this myself a few months ago, but I believe you're correct. If you inherit from ThreadingMixIn, it will create a new thread for each incoming request. I believe it's the same way the standard ThreadingTCPServer

Re: SimpleXMLRPCServer and Threading

2007-03-29 Thread Laszlo Nagy
Jeff McNeil wrote: > This is off of memory so I apologize if I don't get all of the details right. > > The base SimpleXMLRPCServer uses TCPServer as it's server component > and SimpleXMLXMLRPCRequestHandler as it's handler. The handler is a > subclass of BaseHTTPRequestHandler, which itself doesn't

Re: SimpleXMLRPCServer and Threading

2007-03-28 Thread Jeff McNeil
This is off of memory so I apologize if I don't get all of the details right. The base SimpleXMLRPCServer uses TCPServer as it's server component and SimpleXMLXMLRPCRequestHandler as it's handler. The handler is a subclass of BaseHTTPRequestHandler, which itself doesn't handle any multithreading.

Re: SimpleXMLRPCServer and Threading

2007-03-28 Thread Erik Johnson
"Achim Domma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > is SimpleXMLRPCServer multithreaded or how does it handle multiple > clients? I want to implement a simple server which will be queried by > multiple processes for work to be done. The server will simply hold a > q

Re: SimpleXMLRPCServer and Threading

2007-03-28 Thread Jeff McNeil
I do it this way and it's always worked great for me. SimpleXMLRPCServer is based on SocketServer, so you can use the ForkingMixIn or ThreadingMixIn classe to create something to handle requests in parallel. from SocketServer import ThreadingMixIn import SimpleXMLRPCServer class ThreadedXMLRPCS

Re: SimpleXMLRPCServer and socket

2006-09-26 Thread Juju
Hi, 2006/9/25, Fredrik Lundh <[EMAIL PROTECTED]>: > I don't have time to dig deeper into this right now, but this post might > be helpful: > > http://article.gmane.org/gmane.comp.python.general/471411 I tried to override the "verify_request" method, it managed to get the ClientAddress, but in

Re: SimpleXMLRPCServer and socket

2006-09-26 Thread Fredrik Lundh
Juju wrote: > But I still have a little question : > > How can I do to know which method I should override to make the things work ? > > Usually, I look at "python.org" but in this case, I couldn't find what > I was looking for. Finally, I had to look at the source files to under- > stand what

Re: SimpleXMLRPCServer and socket

2006-09-25 Thread Fredrik Lundh
Juju wrote: > The problem I have, is I don't know how to get the port used by the > remote host ? just curious, but why do you need the *port* number used by the remote host ? -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleXMLRPCServer and client IP address

2006-06-28 Thread Jeremy Monnet
Thanks for your answer ! On 6/28/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > maybe the explanation in that message was good enough for the poster ? I think so ... unfortunately not for me ... yet ! :-) > > Your handler object should be getting set up with the client_address > property. >

Re: SimpleXMLRPCServer and client IP address

2006-06-28 Thread Fredrik Lundh
Jeremy Monnet wrote: > Tips I've found were : > - use the requestHandler and its method address_string(), but I didn't > an easy to understand example > - http://mail.python.org/pipermail/python-list/2006-May/340266.html > but this thread seems not to have been finished :-( maybe the explanation

Re: simplexmlrpcserver and allow_none

2006-06-08 Thread Laszlo Nagy
Thomas Bellman írta: > Laszlo Nagy <[EMAIL PROTECTED]> wrote: > > >> I ran in the same problem again. Many others have the same problem. Just >> Google for this: "SimpleXMLRPCServer allow_none site:python.org". >> Looks like the 'allow_none' patch was commited to trunk on 2005 Dec ( >> http://

Re: simplexmlrpcserver and allow_none

2006-06-08 Thread Thomas Bellman
Laszlo Nagy <[EMAIL PROTECTED]> wrote: > I ran in the same problem again. Many others have the same problem. Just > Google for this: "SimpleXMLRPCServer allow_none site:python.org". > Looks like the 'allow_none' patch was commited to trunk on 2005 Dec ( > http://mail.python.org/pipermail/python-

Re: simplexmlrpcserver and allow_none

2006-06-08 Thread Fredrik Lundh
Laszlo Nagy wrote: > I ran in the same problem again. Many others have the same problem. Just > Google for this: "SimpleXMLRPCServer allow_none site:python.org". > Looks like the 'allow_none' patch was commited to trunk on 2005 Dec ( > http://mail.python.org/pipermail/python-checkins/2005-Decemb

Re: SimpleXMLRPCServer

2006-03-30 Thread infidel
> I'm doing some experiments with the SimpleXMLRPCServer in Python, > and I've found it to be an excellent way to do high-level network > operations. > > However, is there a way to enable "two-way" communication using XML-RPC? > By that I mean, can the server contact all the clients? To do that yo

Re: SimpleXMLRPCServer - disable output

2005-04-14 Thread codecraig
Jeremy, Thanks for clearing that up. I am so used to java (i.e. foo.setLogRequests(0))...that I forgot I could just do, foo.logRequests = 0. Learning one day at a time :) Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleXMLRPCServer - disable output

2005-04-14 Thread Jeremy Jones
codecraig wrote: Jeremy Jones wrote: codecraig wrote: Hi, I thought I posted this, but its been about 10min and hasnt shown up on the group. Basically I created a SimpleXMLRPCServer and when one of its methods

Re: SimpleXMLRPCServer - disable output

2005-04-14 Thread codecraig
Jeremy Jones wrote: > codecraig wrote: > > >Hi, > > I thought I posted this, but its been about 10min and hasnt shown up > >on the group. > > Basically I created a SimpleXMLRPCServer and when one of its methods > >gets called and it returns a response to the client, the server prints > >some inf

Re: SimpleXMLRPCServer - disable output

2005-04-14 Thread Jeremy Jones
codecraig wrote: >Hi, > I thought I posted this, but its been about 10min and hasnt shown up >on the group. > Basically I created a SimpleXMLRPCServer and when one of its methods >gets called and it returns a response to the client, the server prints >some info out to the console, such as, > >lo

Re: SimpleXMLRPCServer - disable output

2005-04-14 Thread Skip Montanaro
codecraig> I thought I posted this, but its been about 10min and hasnt codecraig> shown up on the group. Patience... codecraig> localhost - - [14/Apr/2005 16:06:28] "POST /RPC2 HTTP/1.0" 200 - codecraig> Anyhow, is there a way I can surpress that so its not printed codecraig