To call a method from the same class, you need the keyword self .
class a: def abc(self): print "haha" def test(self): self.abc() // will look for abc method in 'a' class
Without the self keyword, python searches for the abc method in the global scope, so you get this error.
source share