Skip to main content

Home/ topot_controller/ Group items tagged javascript

Rss Feed Group items tagged

marcell mars

Article:Accessing JSON-RPC with Python - Spike Developer Zone - 0 views

  •  
    remote procedure calls with python exchanging javascript objecst on the way.. hm.. testing description in diigo ;)
marcell mars

Adobe Flash Served by Python - 0 views

  • from SimpleXMLRPCServer import SimpleXMLRPCServer,SimpleXMLRPCRequestHandler class ExtendedXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): def do_GET(self): #only allow a request for the crossdomain file #this can be changed to support GETs of any file if needed if self.path != '/crossdomain.xml': self.send_response(403) self.log_request(403) return #open the crossdomain file and read its contents f = file('crossdomain.xml', 'r') msg = f.read() f.close() #write the data to the socket along with valid HTTP headers res = 'HTTP/1.0 200 OK\r\nDate: %s\r\n\r\n%s' % \ (self.date_time_string(),msg) self.wfile.write(res) self.log_request(200) class EchoClass: def echo(self, data): return data #create an instance of the class s = EchoClass() #create the server on localhost server = SimpleXMLRPCServer(('', 8000), ExtendedXMLRPCRequestHandler) #register the instance as a web service server.register_instance(s) #start accepting requests server.serve_forever()
1 - 5 of 5
Showing 20 items per page