[Tutor] python sockets

Marc Tompkins marc.tompkins at gmail.com
Tue Jun 10 22:23:41 CEST 2014


On Tue, Jun 10, 2014 at 9:28 AM, Jon Engle <jon.engle at gmail.com> wrote:


>     for port in range (startingPort, 65535):
> thread.start_new_thread(setup, (port,))
>  startingPort=startingPort+1
> #print startingPort
>

I think you just need this:

    for port in range (startingPort, 65535):
> thread.start_new_thread(setup(port))
>         #print port
>

and inside of setup, get rid of this line:
PORT = startingPort    #arbitrary port not currently in use
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140610/0ab924b0/attachment.html>


More information about the Tutor mailing list