Writing a C/S python script to transmit the data