title: Pass variable contents to class function in Python
body: <p>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 <code>p_number</code>.</p>
  
  <h1>Pseudo</h1>
  
  <pre><code>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
  </code></pre>
  
  <h1>Wanted Output</h1>
  
  <pre><code>50885
  50886
  50887
  50888
  50889
  50890
  50891
  50892
  50893
  50894
  50895
  ... Numbers in-between
  50914
  50915
  </code></pre>
  
  <p>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.</p>