Python socket-module: How to change the local port on the client side? <p>I want to get packages from a network using TCP/IP as a client. </p> <p>With ...</p> <pre><code>connect((TCP_IP, TCP_PORT)) </code></pre> <p>... I can change the port of the peer address. But I change the port of my local computer?</p> <p>EDIT: I want to use a network card with four ports. The network card is connected to a measurement device which sends a lot of data. How can I see where the data goes? How can I distinguish between this four ports?</p>