title: Why is 'module' object not callable?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4534438/typeerror-module-object-is-not-callable">TypeError: ‘module’ object is not callable</a>  </p>
  </blockquote>
  
  
  
  <p>This is my very first Python attempt, just trying to regain basic programming knowledge after a 10 year silence in a, for me, new language, Python. The basic idea is a tiny battly engine which decides the better hit. The bugging code is next.</p>
  
  <pre><code>self.__power = self.__att*random(2,4)/dier.__defn
  </code></pre>
  
  <p>As my python knowledge is extremely basic, I'm rather scared of saying the right things so Im gonna put my code down below (47 lines), you..ll notice it is really transparant so I dont suspect this will give any problem. The errorline is 16. I tried renaming the att variable to atta as well as some repositionings though new bugs come, I solve them and in the end its always the same error on the same line.</p>
  
  <pre><code>class Character:
  def __init__(self,name="", att=0,defn=0,lvl=0,leven=0,exp=0, power=0):
          self.__att = att
          self.__defn = defn
          self.__lvl = lvl
          self.__leven = leven
          self.__name = name
          self.__xp = exp
          self.__power = power
  
      def batl(self):
          import random
          while self.__lvl &lt;= 3:
              dier = Character("Anaconda",1,1,50,1,0,0)
              print "You encountered an " + dier.__name + " and fight it."
              **self.__power = self.__att*random(2,4)/dier.__defn**
              dier.__power = (dier.__att*random(1,4))/self.__defn
              if self.power &gt; dier.power:
                  growth = dier.__lvl*dier.__atta
                  groei()
              else:
                  dmg = dier.lvl*dier.att
                  leven = leven-dmg
              if leven &lt; 0:
                  print "Alas, you're done for."
                  exit()
              else:
                  print "You took " + dmg + "damage and have " + leven + "life left."
  
  
      def groei(self):
          if (growth+exp) &gt; 100:
              lvl += 1
              exp = growth-100
              print "You won and gained " + str(growth) + " and grew from level " + str(lvl-1) + " to level " + str(lvl) + "."
          else:
              exp = growth + exp
              print "You won and gained " + str(growth) + "."
  </code></pre>
  
  <p>def main():</p>
  
  <pre><code>hero = Character("Nevery",2,1,2,100,0,0)
  hero.batl()
  </code></pre>
  
  <p>if <strong>name</strong> == '<strong>main</strong>':
      main()</p>
  
  <p>As you can see ive got my character class, in which i have defined the battle() method and the groei() method, very basic. Can anyone point me what I'm missing out on, been looking at it for hours. Thanks in Advance</p>