def __init__(self, shortpath, filepath, filemode=None, logger=None): TextIOWrapper.__init__(self, FileIO(filepath, 'a'), encoding='utf-8') self.shortpath = shortpath self.filepath = filepath self._log = logger self._filemode = filemode