title: instance has no attribute (python)
body: <p>I have a weird issue, which is probably easy to resolve.</p>
  
  <p>I have a class Database with an <code>__init__</code> and an <code>executeDictMore</code> method (among others).</p>
  
  <pre><code>class Database():
      def __init__(self, database, server,login, password ):
          self.database = database
          my_conv = { FIELD_TYPE.LONG: int }
          self.conn = MySQLdb.Connection(user=login, passwd=password, db=self.database, host=server, conv=my_conv)
          self.cursor = self.conn.cursor()
  
      def executeDictMore(self, query):
          self.cursor.execute(query)
          data = self.cursor.fetchall()
          if data == None :
              return None
          result = []
          for d in data:
              desc = self.cursor.description
              dict = {}
              for (name, value) in zip(desc, d) :
                  dict[name[0]] = value
              result.append(dict)
          return result
  </code></pre>
  
  <p>Then I instantiate this class in a file db_functions.py : </p>
  
  <pre><code>from Database import Database
  db = Database()
  </code></pre>
  
  <p>And I call the executeDictMore method from a function of db_functions :</p>
  
  <pre><code>def test(id):
      query = "SELECT * FROM table WHERE table_id=%s;" %(id)
      return db.executeDictMore(query)
  </code></pre>
  
  <p>Now comes the weird part.
  If I import db_functions and call db_functions.test(id) from a python console:</p>
  
  <pre><code>import db_functions
  t = db_functions.test(12)
  </code></pre>
  
  <p>it works just fine.
  But if I do the same thing from another python file I get the following error :</p>
  
  <pre><code>AttributeError: Database instance has no attribute 'executeDictMore'
  </code></pre>
  
  <p>I really don't understand what is going on here. I don't think I have another Database class interfering. And I append the folder where the modules are in sys.path, so it should call the right module anyway.</p>
  
  <p>If someone has an idea, it's very welcome.</p>