I'm trying to pass the contents of a variable to a function within a class that's run as a thread. How would I do this? Following is some pseudo code that should have the output following. The variable in question is p_number.
Pseudo
class sessioning(Thread):
def run(self, p_number):
print p_number
p_number = 50885
for i in xrange(30):
sessioning().start(p_number)
p_number+=1
Wanted Output
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
... Numbers in-between
50914
50915
Please note that this code is just an example, and I'm not actually performing overkill. This is a general question, but my specific application is to have it listen on ports within that range.