Letting a Python application phone home

Nils Oliver Kröger nokroeger at gmail.com
Sat Jul 15 11:45:16 EDT 2006


Am Freitag, 14. Juli 2006 15:26 schrieb Dieter Vanderelst:

This is surely possible. You need to define a protocol for the communication 
between client and server. As you are planning to send data over the internet 
you should build it on top of tcp. Look at the python module "socket" resp. 
"SocketServer" for low level tcp functions.

As the data should not be visible to everyone you need some kind of 
encryption. Either you rely on the ssl capabilities of the "socket" module, 
this way securing the transport layer (tcp) or you build encryption into your 
newly designed application layer protocol. For the latter have a look at the 
"python cryptography toolkit". Sorry I have no url at hand, simply google.

Concerning the question of stopping the program when the internet connection 
breaks: let your program contact the server periodically. If this fails quit 
the program.

Regards

Nils



More information about the Python-list mailing list