sockets - Network programming in Python -


What library should I use for network programming? Is socket the best, or a high level interface, which is the standard?

I need something that will be very cross-platform (ie Linux, Windows, Mac OS X), and be able to connect it to other python programs using only one library. needed.

Would you like to send python data between bus nodes (possibly on separate computers)? If you want to see SimpleXMLRPCServer, it is based on an inbuilt HTTP server, which is based on the inbuilt socket server, none of which are around the most industrial power servers, but it is easy to install in a hurry:

  SimpleXMLRPCServer Server = SimpleXMLRPCServer (("localhost", 9876)) def my_func (A, B): Return A + B server.register_function (my_func) server.serve_forever ()  

and

  import xmlrpclib S = xmlrpclib.ServerProxy ('http: // localhost: 9876') to connect Easy print Mitigation s.my_func (2,3) & gt; & Gt; & Gt; 5 Print Types (s.my_func (2,3)) & gt; & Gt; & Gt; & Lt; Type 'int' & gt; Print s.my_func (2,3.0): & gt; & Gt; & Gt; 7.0  

Popular for twisted industrial applications, but it has got a cruel learning curve.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -