You could create a ServerThread
class to encapsulate your XML-RPC server and run it in a thread :
class ServerThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.localServer = SimpleThreadedXMLRPCServer(("localhost",10007))
self.localServer.register_function(getTextA) #just return a string
def run(self):
self.localServer.serve_forever()
You can use this class the following way :
server = ServerThread()
server.start() # The server is now running
print "I want to continue my code after this..."