Pyenos wrote: > class TREE: > def gettree(self):print self > TREE.gettree() # I get an error saying > # TypeError: unbound method gettree() must be called > # with TREE instance as first argument (got nothing instead > > > I still don't understand how to solve this simple code.
You first need to create an instance of the class: tree = TREE() tree.gettree() or TREE().gettree() Hope this helps. Adonis P.S. You should look into the tutorial http://docs.python.org/tut/tut.html it will answer a lot of your questions. -- http://mail.python.org/mailman/listinfo/python-list