xmlrpclib

Using **kwargs with SimpleXMLRPCServer in python

I have a class that I wish to expose as a remote service using pythons SimpleXMLRPCServer. The server startup looks like this: server = SimpleXMLRPCServer((serverSettings.LISTEN_IP,serverSettings.LISTEN_PORT)) service = Service() server.register_instance(service) server.serve_forever() I then have a ServiceRemote class that looks li...

How to expose client_address to all methods, using xmlrpclib?

I create little SimpleXMLRPCServer for check ip of client. I try this: Server import xmlrpclib from SimpleXMLRPCServer import SimpleXMLRPCServer server = SimpleXMLRPCServer(("localhost", 8000)) def MyIp(): return "Your ip is: %s" % server.socket.getpeername() server.register_function(MyIp) server.serve_forever() Client impo...

Python XMLRPC: Handling arbitrary exceptions on client-side

I'm trying to pass arbitrary exceptions from a XMLRPC server to a client (both Python scripts, exception types are defined on both sides). There's an exemplary client-side implementation at ActiveState Recipes which parses the returned "faultString", compares it with a list of known exceptions and, if found, raises that exception (instea...

Timeout for xmlrpclib client requests

I am using Python's xmlrpclib to make requests to an xml-rpc service. Is there a way to set a client timeout, so my requests don't hang forever when the server is not available? I know I can globally set a socket timeout with socket.setdefaulttimeout(), but that is not preferable. ...

Call the Python interactive interpreter from within a Python script

Is there any way to start up the Python interpreter from within a script , in a manner similar to just using python -i so that the objects/namespace, etc. from the current script are retained? The reason for not using python -i is that the script initializes a connection to an XML-RPC server, and I need to be able to stop the entire prog...

Does XML-RPC in general allows to call few functions at once?

Can I ask for few question in one post to XML-RPC server? If yes, how can I do it in python and xmlrpclib? I'm using XML-RPC server on slow connection, so I would like to call few functions at once, because each call costs me 700ms. ...

xmlrpclib python - same script, different result

Hello, how can that happen that the same script produces different result on different machines (development & release)? Here is the script: import xmlrpclib print "ServerProxy" s = xmlrpclib.ServerProxy('http://jira.mycompany.com:80/rpc/xmlrpc') print "call get_tasks()..." ret_get_tasks = s.JiraVSB.get_tasks( "BDD", ["user"] ) print ...

IronPython in C#: No module named xmlrpclib

I am trying to build a web application with an interactive console for IronPython. When I try to import xmlrpclib in IronPython's normal console, it works. However, if I use IronPython inside my C# code, it throws an exception "No module named xmlrpclib". Is this a known issue? Any solutions to solve this issue? Here's the code: var te...

PHP Pingback problems

I have a custom blogging site, as such I want to create some code that will allow me to pingback other sites that I link to. I have found some code online but cannot get it working! I am using the XMLRPC library and the following code. When I run this I get headers back and the following error code - I cannot seem to find out what it ...

Using gevent with python xmlrpclib

Hello! Is it possible to use python's standard libs xmlrpclib with gevent? Currently i'm tried to use monkey.patch_all(), but without success. from gevent import monkey monkey.patch_all() import gevent import time import xmlrpclib from SimpleXMLRPCServer import SimpleXMLRPCServer import urllib2 def fetch(url): g = gevent.sp...