Holger wrote: > Tried searching for a solution to this, but the error message is so > generic, that I could not get any meaningfull results. > > Anyways - errormessage: > ---------------------------------------------------- > TypeError: addFile() takes exactly 1 argument (2 given) > ---------------------------------------------------- > > The script is run with two args "arg1" and "arg2": > ---------------------------------------------------- > import sys > > class KeyBase: > def addFile(file): > print "initialize the base with lines from this file"
when defining your own classes, you must spell out the "self" argument in your method definitions: def addFile(self, file): print "initialize the base with lines from this file" see: http://pyfaq.infogami.com/what-is-self </F> -- http://mail.python.org/mailman/listinfo/python-list