Trying to creat my first class, getting object has no attribute file error : I'm trying to teach myself object programming in python.
I want my verbals to be just for that instance of the object, which I thought was done by using self.verbalname.

Right now I getting a error for every line that has self.file in it saying 
OBJECT HAS NO ATTRIBUTE FILE
exanple in 
   def open(self):
        # open file
        self.file  = open(self.filename,"r",1);
I get the error message


CODE
class spreedsheet(object):

    def __init__(self, name):
        self.filename = name

    def getFileName(self):
            print(self.filename)

    def open(self):
        # open file
THIS LINE GIVES ME A ERROR SAYING OBJECT HAS NO ATTRIBUTE FILE
        self.file  = open(self.filename,"r",1);

    def close(self):
        # close file
THIS LINE GIVES ME A ERROR SAYING OBJECT HAS NO ATTRIBUTE FILE
        self.file.close();

    def addString(self,add):
        # add a string to a line of the spreed sheet
THIS LINE GIVES ME A ERROR SAYING FILE DOES NOT EXIST
        self.file.write(add)
        self.write(",")

    def addStringRet(self,name):
        # add a string to a line of the spreed sheet
THIS LINE GIVES ME A ERROR SAYING FILE DOES NOT EXIST
        self.file.write(add)
        self.write("\r\n")
       # Add a new string and start a new col



myobject = spreedsheet("agraphdata.txt")
myobject.addString("tedt")
myobject.close()
 






