def open(self):
self.__sf = _sftp_open(self.__sftp_session_int, <EOL>self.__filepath, <EOL>self.access_type_int, <EOL>self.__create_mode)<EOL>if self.access_type_is_append is True:<EOL><INDENT>self.seek(self.filesize)<EOL><DEDENT>return SftpFileObject(self)<EOL>
This is the only way to open a file resource.