Re: Can't catch CTRL-C when SimpleXMLRPCServer running ?

2013-02-22 Thread Roland Koebler
Hi, > I would like to stop the script running in response to a CTRL-C. how about "KeyboardInterrupt"? try: ... except KeyboardInterrupt: print "You pressed Ctrl+C" Roland -- http://mail.python.org/mailman/listinfo/python-list

Can't catch CTRL-C when SimpleXMLRPCServer running ?

2013-02-20 Thread shearichard
Hi - I have a script which instantiates a SimpleXMLRPCServer server and which I use to simulate a 'real server' when developing client scripts which will eventually get used with the 'real server'. I would like to stop the script running in response to a CTRL-C. The scri

example of ssl with SimpleXMLRPCServer in 2.6?

2010-03-18 Thread Rowland Smith
Anyone have an example of using the new ssl module with SimpleXMLRPCServer in 2.6? Thanks, -- -Rowland -- http://mail.python.org/mailman/listinfo/python-list

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-13 Thread News123
Hi Gabriel, News123 wrote: > Hi Gabriel, > > Gabriel Genellina wrote: >> En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: >> >>> I'm using an XMLRPC server under Windows. >>> >>> What I wonder is how I could create a server, that can be killed with >>> CTRL-C >>> >>> The server aborts ea

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-12 Thread Gabriel Genellina
evice driver... That's probably it. It's more annoying for me because I run Windows with a VM on a Mac, which doesn't have ctrl-break. On a "real" PC with Windows XP SP3 and Python 2.6.4, with an idle server, just hitting Ctrl-C was enough: D:\temp>python -m S

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-12 Thread Aahz
In article , Dennis Lee Bieber wrote: >On 11 Feb 2010 21:18:26 -0800, a...@pythoncraft.com (Aahz) declaimed the >following in gmane.comp.python.general: >> In article , >> Gabriel Genellina wrote: >>> >>>Strange. With Python 2.6.4 I don't need to do that; I'd say the difference >>>is in the OS

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-11 Thread Frank Millman
"Aahz" wrote in message news:hl2ob2$3i...@panix5.panix.com... In article , Gabriel Genellina wrote: Strange. With Python 2.6.4 I don't need to do that; I'd say the difference is in the OS or antivirus (some AV are known to break the TCP stack). Perhaps, but I've also found that ctrl-C doe

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-11 Thread Aahz
In article , Gabriel Genellina wrote: > >Strange. With Python 2.6.4 I don't need to do that; I'd say the difference >is in the OS or antivirus (some AV are known to break the TCP stack). Perhaps, but I've also found that ctrl-C doesn't work on Windows. -- Aahz (a...@pythoncraft.com)

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
time). I know there is no was to get the client's address directly and have seen a few examples of subclassing the SimpleXMLRPCServer like this: class RPCServer(SimpleXMLRPCServer): def _dispatch(self, method, params): """Extend dispatch, adding client info to some parameters.&

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
t the client's address directly and have seen a few examples of subclassing the SimpleXMLRPCServer like this: class RPCServer(SimpleXMLRPCServer): def _dispatch(self, method, params): """Extend dispatch, adding client info to some parameters.""" if method in ({my

SimpleXMLRPCServer and client address

2010-02-10 Thread Jordan Apgar
rectly and have seen a few examples of subclassing the SimpleXMLRPCServer like this: class RPCServer(SimpleXMLRPCServer): def _dispatch(self, method, params): """Extend dispatch, adding client info to some parameters.""" if method in ({my list of methods I needed cli

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-06 Thread Gabriel Genellina
En Sat, 06 Feb 2010 21:24:33 -0300, News123 escribió: Gabriel Genellina wrote: En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: I'm using an XMLRPC server under Windows. What I wonder is how I could create a server, that can be killed with CTRL-C Python 2.6 and up behaves exactly as y

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-06 Thread News123
Hi Gabriel, Gabriel Genellina wrote: > En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: > >> I'm using an XMLRPC server under Windows. >> >> What I wonder is how I could create a server, that can be killed with >> CTRL-C >> >> The server aborts easily with CTRL-BREAK but not with CTRL-C (un

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-06 Thread News123
Hi Gabriel, Gabriel Genellina wrote: > En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: > >> I'm using an XMLRPC server under Windows. >> >> What I wonder is how I could create a server, that can be killed with >> CTRL-C >> >> The server aborts easily with CTRL-BREAK but not with CTRL-C (

Re: how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-05 Thread Gabriel Genellina
En Fri, 05 Feb 2010 20:03:51 -0300, News123 escribió: I'm using an XMLRPC server under Windows. What I wonder is how I could create a server, that can be killed with CTRL-C The server aborts easily with CTRL-BREAK but not with CTRL-C (under Windows) If I press CTRL-C it will only abort

how to make a SimpleXMLRPCServer abort at CTRL-C under windows

2010-02-05 Thread News123
Hi, I'm using an XMLRPC server under Windows. What I wonder is how I could create a server, that can be killed with CTRL-C The server aborts easily with CTRL-BREAK but not with CTRL-C (under Windows) If I press CTRL-C it will only abort when the next RPC call occurs. It seems it is blocking i

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

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 tha

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:

SimpleXMLRPCServer daemon

2010-01-29 Thread Thomas Allen
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 always clean up its PID file; is there a

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 log

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 &

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 th

SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-17 Thread Joseph Turian
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 was perplexing. I had some 'print' statements in the handers that, assuming the request would

Re: XML-RPC(using SimpleXMLRPCServer) slow on the first call

2009-10-14 Thread Mahi Haile
-- Forwarded message -- > From: "Gabriel Genellina" > To: python-list@python.org > Date: Wed, 14 Oct 2009 00:52:13 -0300 > Subject: Re: XML-RPC(using SimpleXMLRPCServer) slow on the first call > En Mon, 12 Oct 2009 18:58:45 -0300, Mahi Haile > escrib

Re: XML-RPC(using SimpleXMLRPCServer) slow on the first call

2009-10-13 Thread Gabriel Genellina
En Mon, 12 Oct 2009 18:58:45 -0300, Mahi Haile escribió: Hello all,I have an xml-rpc server running on a machine in the same LAN as the client. Both the server and the client are in Python. When I have a series of xmlrepc calls from the client to the server, the first call usually takes mu

XML-RPC(using SimpleXMLRPCServer) slow on the first call

2009-10-12 Thread Mahi Haile
Hello all,I have an xml-rpc server running on a machine in the same LAN as the client. Both the server and the client are in Python. When I have a series of xmlrepc calls from the client to the server, the first call usually takes much longer than it should - orders of magnitude. The latency is us

SimpleXMLRPCServer timeout issue

2009-08-26 Thread Mahi Haile
Hi all, I have an XML-RPC server running that is using SimpleXMLRPCServer, and I am trying to send a relatively large file on a poor connection [simulated low bandwidth, high latency]. The file is simply the return value of a function call available on the server. However, sometime in to the

Abort SimpleXMLRPCServer request prematurely?

2009-06-29 Thread Joseph Turian
With SimpleXMLRPCServer, if the server is taking too long, how can I use the client to kill the request and have the server abort prematurely? Thanks, Joseph -- http://mail.python.org/mailman/listinfo/python-list

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
ver; in the protocol there are no objects other than the server. > -- > Piet van Oostrum > URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4] > Private email: p...@vanoostrum.org Hi Piet, Yes, I'm aware of this. >You create a single instance of your class and then register

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. >

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 som

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

2009-05-06 Thread Jelle Smet
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 so pleas

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

2009-05-06 Thread J
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 so pleas

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
domain = '.'.join(dnsname.split('.')[1:]) with open(domain+'.zone')) as myfile: # do stuff with data from myfile server.register_instance(MyFunctions()) You would modify the body of that function to meet your processing requireme

Re: SimpleXMLRPCServer question

2009-01-31 Thread flagg
ss, i might even be making > > this tougher than it needs to be.   Is there a way to parse the > > incoming xmlrpc request before the function it is calling is executed? > > Wouldn't you be overriding '_dispatch' on SimpleXMLRPCServer instead? > > It's be

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

SimpleXMLRPCServer question

2009-01-30 Thread rdmurray
se the > incoming xmlrpc request before the function it is calling is executed? Wouldn't you be overriding '_dispatch' on SimpleXMLRPCServer instead? It's been a while since I looked at XMLRPC, but why wouldn't you have a operation names, with the zone file to operate

SimpleXMLRPCServer question

2009-01-30 Thread 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 request will help deterime which zone file is edited.I have been looking at the d

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

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 m

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, st

SimpleXmlRpcServer and character encoding

2008-10-09 Thread shymon
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 is messed up. The c

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&

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 H

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 c

SimpleXMLRPCServer -- turning off request log?

2008-09-25 Thread mh
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 so. Many TIA! Mark -- Mark Harrison

"proper"/best way to hack SimpleXmlRpcServer to support datetime?

2008-07-18 Thread Russell Warren
I'm running python 2.5.1 and it seems that SimpleXmlRpcServer is not setup to support the base datetime module in the same way xmlrpclib has been with "use_datetime". I see that someone (Virgil Dupras) has recently submitted a fix to address this, but I don't want to patch

error in SimpleXMLRPCServer

2008-07-06 Thread vaibhav pol
hi, I create a SimpleXMLRPCServer script which execute the command on server and return the result. code is below accessList=( 'test.org' ) class Server(SimpleXMLRPCServer.SimpleXMLRPCServer): def __init__(self,*args): SimpleXMLRPCServer.SimpleXMLRPCServer.__i

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.

SimpleXMLRPCServer to fastcgi via WSGI?

2008-02-01 Thread Ivan Voras
Hi, 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 really

Re: Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Gabriel Genellina
En Mon, 17 Dec 2007 21:13:32 -0300, Sean DiZazzo <[EMAIL PROTECTED]> escribió: > Why is the following not working? Is there any way to get keyword > arguments working with exposed XMLRPC functions? > > server.py > import SocketServer > from S

Re: Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Terry Reedy
"Sean DiZazzo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Why is the following not working? Is there any way to get keyword | arguments working with exposed XMLRPC functions? | | server.py | import SocketServer | from SimpleXML

Re: Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Sean DiZazzo
On Dec 17, 4:13 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > Why is the following not working? Is there any way to get keyword > arguments working with exposed XMLRPC functions? > > server.py > import SocketServer > from SimpleXMLRPCServer imp

Keyword args to SimpleXMLRPCServer

2007-12-17 Thread Sean DiZazzo
Why is the following not working? Is there any way to get keyword arguments working with exposed XMLRPC functions? server.py import SocketServer from SimpleXMLRPCServer import SimpleXMLRPCServer,SimpleXMLRPCRequestHandler # Threaded mix-in class AsyncXMLRPCServer

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((

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 ServerW

Re: SimpleXMLRPCServer interruptable?

2007-12-06 Thread Bret
t approach > > > > > You could try setting a reasonable timeout on the listening socket; I > > > > would override the server_bind method, calling > > > > self.socket.settimeout(xxx) > > > > before calling the inherited method. I

Re: SimpleXMLRPCServer interruptable?

2007-12-06 Thread Bret
t approach > > > > > You could try setting a reasonable timeout on the listening socket; I > > > > would override the server_bind method, calling > > > > self.socket.settimeout(xxx) > > > > before calling the inherited method. I

Re: SimpleXMLRPCServer interruptable?

2007-12-06 Thread Bret
rpc call a few seconds > > > > later with ... something else to cause handle_request() to complete > > > > again. Obviously, not quite the right approach > > > > You could try setting a reasonable timeout on the listening socket; I > > > would override th

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Edward Kozlowski
ly, not quite the right approach > > > You could try setting a reasonable timeout on the listening socket; I > > would override the server_bind method, calling self.socket.settimeout(xxx) > > before calling the inherited method. I've never actually done it with a > >

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Edward Kozlowski
ethod, calling self.socket.settimeout(xxx) > before calling the inherited method. I've never actually done it with a > SimpleXMLRPCServer, but *should* work. Don't use a very small timeout, > because it affects *all* subsequent operations. > > -- > Gabriel Genel

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Gabriel Genellina
iously, not quite the right approach You could try setting a reasonable timeout on the listening socket; I would override the server_bind method, calling self.socket.settimeout(xxx) before calling the inherited method. I've never actually done it with a SimpleXMLRPCServer, but *should*

Re: SimpleXMLRPCServer interruptable?

2007-12-05 Thread Bret
an absence and it's surprising how > many things I've forgotten since wandering (against my will) into Java > land. > > Anyway, I have a need for a way to make SimpleXMLRPCServer > interruptable. Basically, I have a main server that, in response to > certain RPC calls, cre

SimpleXMLRPCServer interruptable?

2007-12-05 Thread Bret
I'm coming back to Python after an absence and it's surprising how many things I've forgotten since wandering (against my will) into Java land. Anyway, I have a need for a way to make SimpleXMLRPCServer interruptable. Basically, I have a main server that, in response to ce

Re: Failure to connect in SimpleXMLRPCServer/xmlrpclib

2007-10-22 Thread iu2
On Oct 22, 12:47 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > iu2 wrote: > > Hi all, > > > I've copied the example of RPC usage from the Python's doc. > > When the client and server were on the same PC ("localhost") (I use > > Windows) > > it worked ok. But putting the server on a different PC

Re: Failure to connect in SimpleXMLRPCServer/xmlrpclib

2007-10-22 Thread Diez B. Roggisch
>> Maybe using the IP-address helps? >> >> Diez- Hide quoted text - >> >> - Show quoted text - > > No, that doesn't help either. > May be I don't use it right. > I tried "http://1.2.3.4:8000"; > and > r"http://\\1.2.3.4:8000"; > > with no success. The former should work. The latter is Windows-na

Re: Failure to connect in SimpleXMLRPCServer/xmlrpclib

2007-10-22 Thread J. Cliff Dyer
iu2 wrote: > Hi all, > > I've copied the example of RPC usage from the Python's doc. > When the client and server were on the same PC ("localhost") (I use > Windows) > it worked ok. But putting the server on a different PC raised the > error: > > gaierror: (11001, 'getaddrinfo failed') > The error

Re: Failure to connect in SimpleXMLRPCServer/xmlrpclib

2007-10-22 Thread iu2
On Oct 22, 10:21 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > iu2 wrote: > > > Hi all, > > > I've copied the example of RPC usage from the Python's doc. > > When the client and server were on the same PC ("localhost") (I use > > Windows) > > it worked ok. But putting the server on a differen

Re: Failure to connect in SimpleXMLRPCServer/xmlrpclib

2007-10-22 Thread Diez B. Roggisch
iu2 wrote: > > Hi all, > > I've copied the example of RPC usage from the Python's doc. > When the client and server were on the same PC ("localhost") (I use > Windows) > it worked ok. But putting the server on a different PC raised the > error: > > gaierror: (11001, 'getaddrinfo failed') > The

Failure to connect in SimpleXMLRPCServer/xmlrpclib

2007-10-21 Thread iu2
Hi all, I've copied the example of RPC usage from the Python's doc. When the client and server were on the same PC ("localhost") (I use Windows) it worked ok. But putting the server on a different PC raised the error: gaierror: (11001, 'getaddrinfo failed') The error was raised upion accessing s

Re: How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread Jeff McNeil
t; >try: > >return getattr(self, method)(*args) > > except: > >handle_logging() > > > > server = SimpleXMLRPCServer(("localhost", 8000)) > > server.register_instance(MyCalls()) > > server.serve_forever(

Re: How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread [EMAIL PROTECTED]
try: >return getattr(self, method)(*args) >except: >handle_logging() > > server = SimpleXMLRPCServer(("localhost", 8000)) > server.register_instance(MyCalls()) > server.serve_forever() > Thanks, that works. I'm not sure why I d

Re: How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread Jeff McNeil
erver = SimpleXMLRPCServer(("localhost", 8000)) server.register_instance(MyCalls()) server.serve_forever() -Jeff On 9/27 On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Sep 27, 3:55 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote: > > Instead of register

Re: How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread [EMAIL PROTECTED]
ch(self, method, args): > try: > self.getattr(self, method)(*args) > except: > handle_logging() > > server = SimpleXMLRPCServer(("localhost", 8000)) > server.register_instance(MyCalls()) > server.serve_forever() > >

Re: How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread Jeff McNeil
dispatch(self, method, args): > try: > self.getattr(self, method)(*args) > except: > handle_logging() > > server = SimpleXMLRPCServer(("localhost", 8000)) > server.register_instance(MyCalls()) > server.serve_forever() > &g

Re: How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread Jeff McNeil
: handle_logging() server = SimpleXMLRPCServer(("localhost", 8000)) server.register_instance(MyCalls()) server.serve_forever() There might be an easier way... but this works for me. -Jeff On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a pretty simple XMLRPCServ

Re: How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I have a pretty simple XMLRPCServer, something along the lines of the > example: > > server = SimpleXMLRPCServer(("localhost", 8000)) > server.register_function(pow) > server.register_function(lambda x,y: x+y, 'add') > serve

How to Catch Errors in SimpleXMLRPCServer

2007-09-27 Thread [EMAIL PROTECTED]
I have a pretty simple XMLRPCServer, something along the lines of the example: server = SimpleXMLRPCServer(("localhost", 8000)) server.register_function(pow) server.register_function(lambda x,y: x+y, 'add') server.serve_forever() Now what I want to do is catch any errors tha

Re: xmlrpclib and SimpleXMLRPCServer questions

2007-09-12 Thread Jeff McNeil
Duh... you can pass allow_none=True to SimpleXMLRPCServer() On 9/12/07, Jeff McNeil <[EMAIL PROTECTED]> wrote: > Have a look at the XMLRPC specification @ http://www.xmlrpc.com/spec. > There is no representation of NULL/None, thus server refuses to > Marshall the 'None&

Re: xmlrpclib and SimpleXMLRPCServer questions

2007-09-12 Thread Jeff McNeil
simple server and client through > XMLRPC in python. > > Here's my code: > > SERVER > > import SimpleXMLRPCServer > > > class DataServer: > def __init__(self): > pass > > def test(self,test): > self.this = test > > d

xmlrpclib and SimpleXMLRPCServer questions

2007-09-12 Thread xkenneth
So i've been trying to set up a simple server and client through XMLRPC in python. Here's my code: SERVER import SimpleXMLRPCServer class DataServer: def __init__(self): pass def test(self,test): self.this = test def show(self): print self.th

Re: can't import SimpleXMLRPCDisptacher from SimpleXMLRPCServer

2007-08-07 Thread bhamdeveloper
On Aug 6, 1:01 pm, bhamdeveloper <[EMAIL PROTECTED]> wrote: > from my server I can't import SimpleXMLRPCDispatcher. please > seehttp://intertubewaypoint.com/metaweblog/for the stacktrace/error > message. This onle happens on my server; I am trying to integrate the > metaweblog api into my blog a

can't import SimpleXMLRPCDisptacher from SimpleXMLRPCServer

2007-08-06 Thread bhamdeveloper
from my server I can't import SimpleXMLRPCDispatcher. please see http://intertubewaypoint.com/metaweblog/ for the stacktrace/error message. This onle happens on my server; I am trying to integrate the metaweblog api into my blog and it is barfing when trying to get that dispatcher. Anyone seen t

Re: multi threaded SimpleXMLRPCServer

2007-05-14 Thread c james
I use a variation of the following. Clean and straight forward. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/425043 Vyacheslav Maslov wrote: > Hi, all! > > I need multi threaded version of SimpleXMLRPCServer. Does python library > already have implementation of this on

Re: multi threaded SimpleXMLRPCServer

2007-05-14 Thread Stefan Behnel
Vyacheslav Maslov wrote: > I need multi threaded version of SimpleXMLRPCServer. Does python library > already have implementation of this one? Or i need to implement multi > threading by myself? > > Which way is the simpliest? Twisted has XML-RPC support: http://twistedmatrix.co

Re: multi threaded SimpleXMLRPCServer

2007-05-14 Thread Facundo Batista
Vyacheslav Maslov wrote: > I need multi threaded version of SimpleXMLRPCServer. Does python library > already have implementation of this one? Or i need to implement multi > threading by myself? Don't know, but maybe this helps. Here's a framework I implemented, where

  1   2   >