def print_error(self, msg): err = clibssh.ssh_get_error(self.session) print "%s: %s" % (msg, err)
def write(self, data): rc = clibssh.sftp_write(self.file, bytes(data), len(bytes(data))) err = clibssh.ssh_get_error(self.session.session.session) return rc