ニュース

In Python, sys.stdin is a read-only file object from which you can grab the user's input. So, if you want to test the "double" function from above, you can (should) replace sys.stdin with another file ...
The only time to pickle something is if you need to represent a non-string object on disk, but Python code is strings. I presume that the receiving program is basically calling eval (skt.recv ()).