'Open a new file named \'filename\'.  This overrides both the
\'filename\' and \'file\' arguments to the constructor.'

def open(self, filename):

    self.filename = filename
    self.file = io.open(self.filename, 'r', errors=self.errors)
    self.current_line = 0
