I want to stream a binary data using python. I do not  have any idea how to achieve it. I did created python socket program using SOCK_DGRAM. Problem with SOCK_STREAM is that it does not work over internet as our isp dont allow tcp server socket. 
I want to transmit screen shots periodically to remote computer.
I have an idea of maintaining a Que of binary data and have two threads write and read synchronously. 
I do not want to use VNC .
How do I do it?
I did written server socket and client socket using SOCK_STREAM  it was working on localhost and did not work over internet even if respective ip's are placed. We also did tried running tomcat web server on one pc and tried accessing via other pc on internet and was not working.
There are two problems here.
First problem, you will need to be able to address the remote party.  This is related to what you referred to as "does not work over Internet as most ISP don't allow TCP server socket".  It is usually difficult because the other party could be placed behind a NAT or a firewall.
As for the second problem, the problem of actual transmitting of data after you can make a TCP connection, python socket would work if you can address the remote party.
How to stream binary data in python