On Tue, Jun 10, 2014 at 2:00 PM, Jon Engle <[email protected]> wrote:
> Ok, so after making the changes the code does bind the startingPort > variable but that is the only port that gets bound. Also when connecting to > the startingPort I receive the following error: > > Please enter starting port: 65520 > > listening... > > ...connected! > > Traceback (most recent call last): > > File "response.py", line 31, in <module> > > thread.start_new_thread(setup(port)) > > TypeError: start_new_thread expected at least 2 arguments, got 1 > Sorry about that! I should have read the docs (https://docs.python.org/2/library/thread.html) for thread.start_new_thread(); you had it right in the code you posted (it was the rest of your loop that was a problem.) So, change it back to: for port in range (startingPort, 65535): > thread.start_new_thread(setup, (port,)) > #print port > My apologies for the bum steer.
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
