def __init__(self, *args, **kwargs): # initialize the parent class... FileIO.__init__(self, *args, **kwargs) # this gives you: # self.dataPath == the connection string or path to file # self.mode == the mode the file should be opened in self.fileObj = open(self.dataPath, self.mode)
def __init__(self, *args, **kwargs): FileIO.__init__(self, *args, **kwargs) self.fileObj = open(self.dataPath, self.mode)
def close(self): self.fileObj.close() #clean up the parent class too.... FileIO.close(self)
def close(self): self.fileObj.close() FileIO.close(self)