Counter in a recursive function in Python is not producing an output with Print(using Netbeans)
<p>I am  new to Python. I am using Netbeans IDE 6.8. When I run the code below- using RUN FILE- it does not seem to produce any output. On the other hand when I debug the code, the output shows the  value of  counter- 6.</p>

<p>Is this a problem with the program below or one of quirks of Netbeans.</p>

<p>Here is the code:</p>

<pre><code>  class Counter:  
     pass  
  def cInit():  
   # Create counter
     ctr = Counter()  
     ctr.value = 0  
     # Define and call a recursive function that modifies counter  
     def inner(n):  
        if (n &gt; 0): inner(n-1)  
        ctr.value = ctr.value + 1  
     inner(5)  
     # Get counter   
     return ctr.value  
  if __name__ == "__main__":  
     print "Hello World";  
     d = cInit()  
     print d  
</code></pre>
