title: Python socket: cannot receive int array
body: <p>I try to make a inter process communication between a Python and c program via winsockets. Sending a string does work, but now I try to send an int array from the c socket to the python socket.</p>
  
  <p>I already found out that I have to use htonl() to convert the int array into a byte stream as the send function of winsock2 cannot send int arrays directly.</p>
  
  <p>Now I want to use ntohl() in the python socket but the receive function returns bytes whereas ntohl() needs an integer value as input. </p>
  
  <p>Here is my code</p>
  
  <p>C-Side (just relevant parts):</p>
  
  <pre><code>uint32_t a[1] = {1231};
  uint32_t a_converted[1]={0};
  a_converted[0] = htonl(a[0]);
  iResult = send( ConnectSocket, ( char *)   a_converted, sizeof( a_converted), 0 );
  </code></pre>
  
  <p>Python Side (just relevant parts):</p>
  
  <pre><code>data = connection.recv(16)
  data_i = socket.ntohl(data)
  </code></pre>