(cls, input_file, ftinitupload_resp,
                       reporthook=None, fallbackhost=None)
return cls.upload(
            input_file=input_file, adr=adr, ftkey=ftkey, seekpos=seekpos,
            reporthook=reporthook)
This is *almost* a shortcut for:

            >>> TS3FileTransfer.upload(
                    input_file = file,
                    adr = (resp[0]["ip"], int(resp[0]["port"])),
                    ftkey = resp[0]["ftkey"],
                    seekpos = resp[0]["seekpos"],
                    reporthook = reporthook
                    )
            ...

        Note, that the value of ``resp[0]["ip"]`` is a csv list and needs
        to be parsed.

        For the final upload, :meth:`upload` is called.
This is *almost* a shortcut for:
This is * almost * a shortcut for :
def upload_by_resp(cls, input_file, ftinitupload_resp,
                       reporthook=None, fallbackhost=None):
        """
        This is *almost* a shortcut for:

            >>> TS3FileTransfer.upload(
                    input_file = file,
                    adr = (resp[0]["ip"], int(resp[0]["port"])),
                    ftkey = resp[0]["ftkey"],
                    seekpos = resp[0]["seekpos"],
                    reporthook = reporthook
                    )
            ...

        Note, that the value of ``resp[0]["ip"]`` is a csv list and needs
        to be parsed.

        For the final upload, :meth:`upload` is called.
        """
        if "ip" in ftinitupload_resp[0]:
            ip = cls._ip_from_resp(ftinitupload_resp[0]["ip"])
        elif fallbackhost:
            ip = fallbackhost
        else:
            raise TS3UploadError(0, "The response did not contain an ip.")

        port = int(ftinitupload_resp[0]["port"])
        adr = (ip, port)

        ftkey = ftinitupload_resp[0]["ftkey"]
        seekpos = int(ftinitupload_resp[0]["seekpos"])
        return cls.upload(
            input_file=input_file, adr=adr, ftkey=ftkey, seekpos=seekpos,
            reporthook=reporthook)
def upload_by_resp ( cls , input_file , ftinitupload_resp , reporthook = None , fallbackhost = None ) : if "ip" in ftinitupload_resp [ 0 ] : ip = cls . _ip_from_resp ( ftinitupload_resp [ 0 ] [ "ip" ] ) elif fallbackhost : ip = fallbackhost else : raise TS3UploadError ( 0 , "The response did not contain an ip." ) port = int ( ftinitupload_resp [ 0 ] [ "port" ] ) adr = ( ip , port ) ftkey = ftinitupload_resp [ 0 ] [ "ftkey" ] seekpos = int ( ftinitupload_resp [ 0 ] [ "seekpos" ] ) return cls . upload ( input_file = input_file , adr = adr , ftkey = ftkey , seekpos = seekpos , reporthook = reporthook )