Your IP : 216.73.216.134


Current Path : /opt/rh/rh-python35/root/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/rh/rh-python35/root/lib64/python3.5/__pycache__/ftplib.cpython-35.pyc



���\	��@s�dZddlZddlZddlZddlZddlmZdgZdZdZdZ	Gdd	�d	e
�ZGd
d�de�ZGdd
�d
e�Z
Gdd�de�ZGdd�de�ZeeefZdZdZGdd�d�ZyddlZWnek
r'dZYnBXejZGdd�de�Zejd�eeeejfZdadd�Zdadd�Z dd�Z!dd�Z"dd �Z#d!d"d#d$�Z$d%d&�Z%e&d'kr�e%�dS)(aSAn FTP client class and some helper functions.

Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds

Example:

>>> from ftplib import FTP
>>> ftp = FTP('ftp.python.org') # connect to host, default port
>>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@
'230 Guest login ok, access restrictions apply.'
>>> ftp.retrlines('LIST') # list directory contents
total 9
drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 .
drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 ..
drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 bin
drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 etc
d-wxrwxr-x   2 ftp      wheel        1024 Sep  5 13:43 incoming
drwxr-xr-x   2 root     wheel        1024 Nov 17  1993 lib
drwxr-xr-x   6 1094     wheel        1024 Sep 13 19:07 pub
drwxr-xr-x   3 root     wheel        1024 Jan  3  1994 usr
-rw-r--r--   1 root     root          312 Aug  1  1994 welcome.msg
'226 Transfer complete.'
>>> ftp.quit()
'221 Goodbye.'
>>>

A nice test that reveals some of the network dialogue would be:
python ftplib.py -d localhost -l -p -l
�N)�_GLOBAL_DEFAULT_TIMEOUT�FTP��i c@seZdZdS)�ErrorN)�__name__�
__module__�__qualname__�r
r
�6/opt/rh/rh-python35/root/usr/lib64/python3.5/ftplib.pyr:src@seZdZdS)�error_replyN)rrr	r
r
r
rr;src@seZdZdS)�
error_tempN)rrr	r
r
r
rr
<sr
c@seZdZdS)�
error_permN)rrr	r
r
r
rr=src@seZdZdS)�error_protoN)rrr	r
r
r
rr>srz
s
c@s�eZdZdZdZdZeZeZ	dZ
dZdZdZ
dZddddeddd�Zd	d
�Zdd�Zddd[ddd�Zdd�Zdd�ZeZdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Z d(d)�Z!d*d+�Z"d,d-�Z#d.d/�Z$d0d1�Z%dd2d3�Z&dd4d5�Z'dddd6d7�Z(d8dd9d:�Z)dd;d<�Z*d8ddd=d>�Z+dd?d@�Z,dAdB�Z-dCdD�Z.dEdF�Z/dgdGdH�Z0dIdJ�Z1dKdL�Z2dMdN�Z3dOdP�Z4dQdR�Z5dSdT�Z6dUdV�Z7dWdX�Z8dYdZ�Z9dS)\rayAn FTP client class.

    To create a connection, call the class using these arguments:
            host, user, passwd, acct, timeout

    The first four arguments are all strings, and have default value ''.
    timeout must be numeric and defaults to None if not passed,
    meaning that no timeout will be set on any ftp socket(s)
    If a timeout is passed, then this is now the default timeout for all ftp
    socket operations for this instance.

    Then use self.connect() with optional host and port argument.

    To download a file, use ftp.retrlines('RETR ' + filename),
    or ftp.retrbinary() with slightly different arguments.
    To upload a file, use ftp.storlines() or ftp.storbinary(),
    which have an open file as argument (see their definitions
    below for details).
    The download/upload functions first issue appropriate TYPE
    and PORT or PASV commands.
    r�Nrzlatin-1cCsB||_||_|r>|j|�|r>|j|||�dS)N)�source_address�timeout�connect�login)�self�host�user�passwd�acctrrr
r
r�__init__qs		
zFTP.__init__cCs|S)Nr
)rr
r
r�	__enter__zsz
FTP.__enter__cGs]|jdk	rYz-y|j�Wnttfk
r:YnXWd|jdk	rX|j�XdS)N)�sock�quit�OSError�EOFError�close)r�argsr
r
r�__exit__~s	zFTP.__exit__i�cCs�|dkr||_|dkr*||_|dkr?||_|dk	rT||_tj|j|jf|jd|j�|_|jj|_|jj	dd|j
�|_|j�|_
|j
S)	awConnect to host.  Arguments are:
         - host: hostname to connect to (string, default previous host)
         - port: port to connect to (integer, default previous port)
         - timeout: the timeout to set against the ftp socket(s)
         - source_address: a 2-tuple (host, port) for the socket to bind
           to as its source address before connecting.
        rri�Nr�r�encodingi���)r�portrr�socket�create_connectionrZfamily�af�makefiler$�file�getresp�welcome)rrr%rrr
r
rr�s				zFTP.connectcCs)|jr"td|j|j��|jS)z`Get the welcome message from the server.
        (this is read and squirreled away by connect())z	*welcome*)�	debugging�print�sanitizer,)rr
r
r�
getwelcome�s	zFTP.getwelcomecCs
||_dS)z�Set the debugging level.
        The required argument level means:
        0: no debugging output (default)
        1: print commands and responses but not body text etc.
        2: also print raw lines read and sent before stripping CR/LFN)r-)r�levelr
r
r�set_debuglevel�szFTP.set_debuglevelcCs
||_dS)z�Use passive or active mode for data transfers.
        With a false argument, use the normal PORT mode,
        With a true argument, use the PASV command.N)�
passiveserver)r�valr
r
r�set_pasv�szFTP.set_pasvcCs_|dd�dkrUt|jd��}|dd�d|d||d�}t|�S)N��pass �PASS z
�*>r7r8)�len�rstrip�repr)r�s�ir
r
rr/�s*zFTP.sanitizecCsO|t}|jdkr/td|j|��|jj|j|j��dS)Nrz*put*)�CRLFr-r.r/r�sendall�encoder$)r�liner
r
r�putline�s
zFTP.putlinecCs0|jrtd|j|��|j|�dS)Nz*cmd*)r-r.r/rC)rrBr
r
r�putcmd�s	z
FTP.putcmdcCs�|jj|jd�}t|�|jkrAtd|j��|jdkrftd|j|��|srt�|dd�t	kr�|dd�}n&|dd�t	kr�|dd�}|S)	Nrzgot more than %d bytesz*get*����rF���rG)
r*�readline�maxliner:rr-r.r/rr?)rrBr
r
r�getline�szFTP.getlinecCs�|j�}|dd�dkr�|dd�}xK|j�}|d|}|dd�|kr5|dd�dkr5Pq5W|S)N���-�
)rJ)rrB�codeZnextliner
r
r�getmultiline�szFTP.getmultilinecCs�|j�}|jr+td|j|��|dd�|_|dd�}|d	kr^|S|dkrvt|��|dkr�t|��t|��dS)
Nz*resp*rKr�1�2�3�4�5>rQrRrS)rPr-r.r/Zlastrespr
rr)r�resp�cr
r
rr+�s	zFTP.getrespcCs2|j�}|dd�dkr.t|��|S)z%Expect a response beginning with '2'.NrrR)r+r)rrVr
r
r�voidresp�szFTP.voidrespcCstdt}|jdkr/td|j|��|jj|t�|j�}|dd�d	krpt|��|S)
z�Abort a file transfer.  Uses out-of-band data.
        This does not follow the procedure from the RFC to send Telnet
        IP and Synch; that doesn't seem to work with the servers I've
        tried.  Instead, just send the ABOR command as OOB data.sABORrz*put urgent*NrK�426�225�226>r[rZrY)	�B_CRLFr-r.r/rr@�MSG_OOBrPr)rrBrVr
r
r�abort�s
z	FTP.abortcCs|j|�|j�S)z'Send a command and return the response.)rDr+)r�cmdr
r
r�sendcmd
s
zFTP.sendcmdcCs|j|�|j�S)z8Send a command and expect a response beginning with '2'.)rDrX)rr_r
r
r�voidcmds
zFTP.voidcmdcCsY|jd�}t|d�t|d�g}||}ddj|�}|j|�S)zUSend a PORT command with the current host and the given
        port number.
        �.�zPORT �,)�splitr<�joinra)rrr%ZhbytesZpbytes�bytesr_r
r
r�sendports
 
zFTP.sendportcCs�d}|jtjkrd}|jtjkr6d}|dkrNtd��dt|�|t|�dg}ddj|�}|j|�S)zESend an EPRT command with the current host and the given port number.rrrEzunsupported address familyrzEPRT �|)r(r&�AF_INETZAF_INET6rr<rfra)rrr%r(Zfieldsr_r
r
r�sendeprt!s!zFTP.sendeprtc
Cszd}d}x�tjdd|jtjdtj�D]�}|\}}}}}y&tj|||�}|j|�WnDtk
r�}	z$|	}|r�|j�d}w4WYdd}	~	XnXPq4W|dkr�|dk	r�|�ntd��|jd�|j	�d}
|j
j	�d}|jtjkrE|j||
�}n|j
||
�}|jtk	rv|j|j�|S)z3Create a new socket and send a PORT command for it.Nrz!getaddrinfo returns an empty listr)r&Zgetaddrinfor(ZSOCK_STREAMZ
AI_PASSIVEZbindrr ZlistenZgetsocknamerrjrhrkrr�
settimeout)
r�errr�resr(Zsocktype�protoZ	canonnameZsa�_r%rrVr
r
r�makeport.s6.
	
zFTP.makeportcCsa|jtjkr0t|jd��\}}n't|jd�|jj��\}}||fS)N�PASVZEPSV)r(r&rj�parse227r`�parse229rZgetpeername)rrr%r
r
r�makepasvNs'zFTP.makepasvc

Cs�d}|jr�|j�\}}tj||f|jd|j�}yh|dk	re|jd|�|j|�}|ddkr�|j�}|ddkr�t|��Wqs|j	��YqsXn�|j
���}|dk	r�|jd|�|j|�}|ddkr|j�}|ddkr;t|��|j�\}}	|jtk	rl|j
|j�WdQRX|dd�dkr�t|�}||fS)	a�Initiate a transfer over the data connection.

        If the transfer is active, send a port command and the
        transfer command, and accept the connection.  If the server is
        passive, send a pasv command, connect to it, and start the
        transfer command.  Either way, return the socket for the
        connection and the expected size of the transfer.  The
        expected size may be None if it could not be determined.

        Optional `rest' argument can be a string that is sent as the
        argument to a REST command.  This is essentially a server
        marker used to tell the server to skip over any data up to the
        given marker.
        NrzREST %srrRrQrK�150)r3rur&r'rrr`r+rr rqZacceptrrl�parse150)
rr_�rest�sizerr%�connrVrZsockaddrr
r
r�ntransfercmdUs<	
zFTP.ntransfercmdcCs|j||�dS)z0Like ntransfercmd() but returns only the socket.r)r{)rr_rxr
r
r�transfercmd�szFTP.transfercmdcCs�|sd}|sd}|s$d}|dkrF|dkrF|d}|jd|�}|ddkr||jd|�}|ddkr�|jd	|�}|dd
kr�t|��|S)zLogin, default anonymous.Z	anonymousrrMz
anonymous@zUSER rrSzPASS zACCT rR>rrM)r`r)rrrrrVr
r
rr�s 
z	FTP.logini c
Cs|jd�|j||��S}x$|j|�}|s;P||�q%Wtdk	rnt|t�rn|j�WdQRX|j�S)a�Retrieve data in binary mode.  A new port is created for you.

        Args:
          cmd: A RETR command.
          callback: A single parameter callable to be called on each
                    block of data read.
          blocksize: The maximum number of bytes to read from the
                     socket at one time.  [default: 8192]
          rest: Passed to transfercmd().  [default: None]

        Returns:
          The response code.
        zTYPE IN)rar|Zrecv�
_SSLSocket�
isinstance�unwraprX)rr_�callback�	blocksizerxrz�datar
r
r�
retrbinary�s
zFTP.retrbinarycCsR|dkrt}|jd�}|j|��}|jdd|j���}x�|j|jd�}t|�|jkr�td|j��|j	dkr�t
dt|��|s�P|d
d�tkr�|dd�}n&|dd�d	kr|dd
�}||�qQWt
dk	r:t|t
�r:|j�WdQRXWdQRX|j�S)ahRetrieve data in line mode.  A new port is created for you.

        Args:
          cmd: A RETR, LIST, or NLST command.
          callback: An optional single parameter callable that is called
                    for each line with the trailing CRLF stripped.
                    [default: print_line()]

        Returns:
          The response code.
        NzTYPE Ar#r$rzgot more than %d bytesrEz*retr*rNrFrFrGrG)�
print_liner`r|r)r$rHrIr:rr-r.r<r?r}r~rrX)rr_r�rVrz�fprBr
r
r�	retrlines�s*z
FTP.retrlinesc
Cs�|jd�|j||��f}x7|j|�}|s;P|j|�|r%||�q%Wtdk	r�t|t�r�|j�WdQRX|j�S)a9Store a file in binary mode.  A new port is created for you.

        Args:
          cmd: A STOR command.
          fp: A file-like object with a read(num_bytes) method.
          blocksize: The maximum data size to read from fp and send over
                     the connection at once.  [default: 8192]
          callback: An optional single parameter callable that is called on
                    each block of data after it is sent.  [default: None]
          rest: Passed to transfercmd().  [default: None]

        Returns:
          The response code.
        zTYPE IN)rar|�readr@r}r~rrX)rr_r�r�r�rxrz�bufr
r
r�
storbinary�s

zFTP.storbinaryc
Cs�|jd�|j|���}x�|j|jd�}t|�|jkr`td|j��|sgP|dd�tkr�|dtkr�|dd�}|t}|j|�|r"||�q"Wtdk	r�t	|t�r�|j
�WdQRX|j�S)	ahStore a file in line mode.  A new port is created for you.

        Args:
          cmd: A STOR command.
          fp: A file-like object with a readline() method.
          callback: An optional single parameter callable that is called on
                    each line after it is sent.  [default: None]

        Returns:
          The response code.
        zTYPE Arzgot more than %d bytesrENrFrGrG)rar|rHrIr:rr\r@r}r~rrX)rr_r�r�rzr�r
r
r�	storliness$


z
FTP.storlinescCsd|}|j|�S)zSend new account name.zACCT )ra)rZpasswordr_r
r
rr#s
zFTP.acctcGsBd}x|D]}|d|}q
Wg}|j||j�|S)zBReturn a list of files in a given directory (default the current).ZNLST� )r��append)rr!r_�arg�filesr
r
r�nlst(s
zFTP.nlstcGs�d}d}|dd�rSt|d�td�krS|dd�|d	}}x"|D]}|rZ|d|}qZW|j||�dS)
aList a directory in long form.
        By default list current directory to stdout.
        Optional last argument is callback function; all
        non-empty arguments before it are concatenated to the
        LIST command.  (This *should* only be used for a pathname.)ZLISTNrrr�rGrGrGrG)�typer�)rr!r_�funcr�r
r
r�dir1s,
zFTP.dirc
cs�|r$|jddj|�d�|r7d|}nd}g}|j||j�x�|D]�}|jt�jd�\}}}i}	xI|dd	�jd�D].}
|
jd�\}}}||	|j�<q�W||	fVq]WdS)
a<List a directory in a standardized format by using MLSD
        command (RFC-3659). If path is omitted the current directory
        is assumed. "facts" is a list of strings representing the type
        of information desired (e.g. ["type", "size", "perm"]).

        Return a generator object yielding a tuple of two elements
        for every file found in path.
        First element is the file name, the second one is a dictionary
        including a variable number of "facts" depending on the server
        and whether "facts" argument has been provided.
        z
OPTS MLST �;zMLSD %sZMLSDr�Nr�=rG)	r`rfr�r�r;r?�	partitionre�lower)
r�pathZfactsr_�linesrBZfacts_foundrp�name�entryZfact�key�valuer
r
r�mlsd@s

! zFTP.mlsdcCs@|jd|�}|ddkr/t|��|jd|�S)zRename a file.zRNFR rrSzRNTO )r`rra)rZfromnameZtonamerVr
r
r�rename\sz
FTP.renamecCs=|jd|�}|dd�dkr-|St|��dS)zDelete a file.zDELE NrK�250�200>r�r�)r`r)r�filenamerVr
r
r�deletecsz
FTP.deletecCs�|dkrhy|jd�SWqztk
rd}z%|jddd�dkrR�WYdd}~XqzXn|dkrzd}d	|}|j|�S)
zChange to a directory.z..ZCDUPrNrK�500rrbzCWD )rarr!)r�dirname�msgr_r
r
r�cwdks
zFTP.cwdcCsM|jd|�}|dd�dkrI|dd�j�}t|�SdS)zRetrieve the size of a file.zSIZE NrKZ213)r`�strip�int)rr�rVr=r
r
rryxszFTP.sizecCs0|jd|�}|jd�s&dSt|�S)z+Make a directory, return its full pathname.zMKD �257r)ra�
startswith�parse257)rr�rVr
r
r�mkd�szFTP.mkdcCs|jd|�S)zRemove a directory.zRMD )ra)rr�r
r
r�rmd�szFTP.rmdcCs,|jd�}|jd�s"dSt|�S)z!Return current working directory.ZPWDr�r)rar�r�)rrVr
r
r�pwd�szFTP.pwdcCs|jd�}|j�|S)zQuit, and close the connection.ZQUIT)rar )rrVr
r
rr�s
zFTP.quitcCs\z,|j}d|_|dk	r+|j�Wd|j}d|_|dk	rW|j�XdS)z8Close the connection without assuming anything about it.N)r*r r)rr*rr
r
rr �s				z	FTP.closei���):rrr	�__doc__r-r�FTP_PORTr%�MAXLINErIrr*r,r3r$rrrr"rr0r2�debugr5r/rCrDrJrPr+rXr^r`rarhrkrqrur{r|rr�r�r�r�rr�r�r�r�r�r�ryr�r�r�rr r
r
r
rrKsj


 7#	
		c@s�eZdZdZejZdddddddeddd�	Zdddddd�Z	d	d
�Z
dd�Zd
d�Zdd�Z
ddd�Zdd�ZdS)�FTP_TLSa�A FTP subclass which adds TLS support to FTP as described
        in RFC-4217.

        Connect as usual to port 21 implicitly securing the FTP control
        connection before authenticating.

        Securing the data connection requires user to explicitly ask
        for it by calling prot_p() method.

        Usage example:
        >>> from ftplib import FTP_TLS
        >>> ftps = FTP_TLS('ftp.python.org')
        >>> ftps.login()  # login anonymously previously securing control channel
        '230 Guest login ok, access restrictions apply.'
        >>> ftps.prot_p()  # switch to secure data connection
        '200 Protection level set to P'
        >>> ftps.retrlines('LIST')  # list directory content securely
        total 9
        drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 .
        drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 ..
        drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 bin
        drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 etc
        d-wxrwxr-x   2 ftp      wheel        1024 Sep  5 13:43 incoming
        drwxr-xr-x   2 root     wheel        1024 Nov 17  1993 lib
        drwxr-xr-x   6 1094     wheel        1024 Sep 13 19:07 pub
        drwxr-xr-x   3 root     wheel        1024 Jan  3  1994 usr
        -rw-r--r--   1 root     root          312 Aug  1  1994 welcome.msg
        '226 Transfer complete.'
        >>> ftps.quit()
        '221 Goodbye.'
        >>>
        rNc

Cs�|dk	r$|dk	r$td��|dk	rH|dk	rHtd��||_||_|dkr�tj|jd|d|�}||_d|_tj	|||||||	�dS)Nz4context and keyfile arguments are mutually exclusivez5context and certfile arguments are mutually exclusive�certfile�keyfileF)
�
ValueErrorr�r��sslZ_create_stdlib_context�ssl_version�context�_prot_prr)
rrrrrr�r�r�rrr
r
rr�s					zFTP_TLS.__init__TcCs<|r&t|jtj�r&|j�tj||||�S)N)r~rr��	SSLSocket�authrr)rrrrZsecurer
r
rr�s
z
FTP_TLS.logincCs�t|jtj�r!td��|jtjkrE|jd�}n|jd�}|jj	|jd|j
�|_|jjddd|j�|_
|S)z2Set up secure control connection by using TLS/SSL.zAlready using TLSzAUTH TLSzAUTH SSL�server_hostname�moder#r$)r~rr�r�r�r��PROTOCOL_SSLv23rar��wrap_socketrr)r$r*)rrVr
r
rr��s!zFTP_TLS.authcCsFt|jtj�s!td��|jd�}|jj�|_|S)z/Switch back to a clear-text control connection.z
not using TLSZCCC)r~rr�r�r�rar)rrVr
r
r�ccc�s
zFTP_TLS.ccccCs)|jd�|jd�}d|_|S)zSet up secure data connection.zPBSZ 0zPROT PT)rar�)rrVr
r
r�prot_ps
	zFTP_TLS.prot_pcCs|jd�}d|_|S)z"Set up clear text data connection.zPROT CF)rar�)rrVr
r
r�prot_cs	zFTP_TLS.prot_ccCsItj|||�\}}|jr?|jj|d|j�}||fS)Nr�)rr{r�r�r�r)rr_rxrzryr
r
rr{s
	zFTP_TLS.ntransfercmdcCsLdt}|jj|�|j�}|dd�dkrHt|��|S)NsABORrKrYrZr[>�226�225�426)r\rr@rPr)rrBrVr
r
rr^s
z
FTP_TLS.abort)rrr	r�r�r�r�rrrr�r�r�r�r{r^r
r
r
rr��s 	
r�cCs�|dd�dkr"t|��tdkrVddl}|jd|j|jB�atj|�}|sodSt|jd��S)z�Parse the '150' response for a RETR request.
    Returns the expected transfer size or None; size is not guaranteed to
    be present in the 150 message.
    NrKrvrz150 .* \((\d+) bytes\)r)	r�_150_re�re�compile�
IGNORECASE�ASCII�matchr��group)rVr��mr
r
rrw.srwcCs�|dd�dkr"t|��tdkrOddl}|jd|j�atj|�}|spt|��|j�}dj|dd��}t	|d�d>t	|d	�}||fS)
z�Parse the '227' response for a PASV request.
    Raises error_proto if it does not contain '(h1,h2,h3,h4,p1,p2)'
    Return ('host.addr.as.numbers', port#) tuple.NrKZ227rz#(\d+),(\d+),(\d+),(\d+),(\d+),(\d+)rbrL�r6)
r�_227_rer�r�r��searchr�groupsrfr�)rVr�r�Znumbersrr%r
r
rrsBs"rscCs|dd�dkr"t|��|jd�}|dkrIt|��|jd|d�}|dkrwt|��||d||dkr�t|��||d|�j||d�}t|�dkr�t|��|d}t|d�}||fS)	z�Parse the '229' response for an EPSV request.
    Raises error_proto if it does not contain '(|||port|)'
    Return ('host.addr.as.numbers', port#) tuple.NrKZ229�(r�)rr6)r�findrrer:r�)rVZpeer�left�right�partsrr%r
r
rrtVs %
rtcCs�|dd�dkr"t|��|dd�dkr<dSd}d}t|�}xa||kr�||}|d}|dkr�||ks�||dkr�P|d}||}qWW|S)	z�Parse the '257' response for a MKD or PWD request.
    This is a response to a MKD or PWD request: a directory name.
    Returns the directoryname in the 257 reply.NrKr�r6z "rr�")rr:)rVr�r>�nrWr
r
rr�ls 


r�cCst|�dS)z+Default retrlines callback to print a line.N)r.)rBr
r
rr��sr�r�Ic	Cs�|s|}d|}|j|�|j|�t|jd��\}}|j||�|jd|�}|dd�d	kr�t�|jd|�}|dd�d
kr�t�|j�|j�dS)z+Copy file from one FTP-instance to another.zTYPE rrzSTOR NrK�125rvzRETR >r��150>r�r�)rarsr`rhrrX)	�sourceZ
sourcename�targetZ
targetnamer�Z
sourcehostZ
sourceportZtreplyZsreplyr
r
r�ftpcp�s



r�cCsnttj�dkr/ttj�tjd�ddl}d}d}x+tjddkrt|d}tjd=qJWtjddd�dkr�tjddd�}tjd=tjd}t|�}|j	|�d}}}y|j|�}Wn.t
k
r*|dk	r&tjjd�YnBXy|j
|�\}}}Wn"tk
rktjjd	�YnX|j|||�x�tjdd�D]�}	|	dd�d
kr�|j|	dd��q�|	dd�dkrd}
|	dd�r
|
d|	dd�}
|j|
�}q�|	d
kr?|j|j�q�|jd|	tjjd�q�W|j�dS)z�Test program.
    Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ...

    -d dir
    -l list
    -p password
    rErNrz-dz-rrz5Could not open account file -- using anonymous login.z$No account -- using anonymous login.z-lZCWDr�z-pzRETR i)r:�sys�argvr.�testr��exit�netrcrr2r�stderr�writeZauthenticators�KeyErrorrr�r`r5r3r��stdoutr)r�r-ZrcfilerZftpZuseridrrZnetrcobjr*r_rVr
r
rr��sP	







	
r��__main__)'r��osr�r&�warningsr�__all__r]r�r��	Exceptionrrr
rrrrZ
all_errorsr?r\rr��ImportErrorr}r�r�r�ZSSLErrorr�rwr�rsrtr�r�r�r�rr
r
r
r�<module>sN
	��`
	x
9

Rosenblum TV: Video training, virtual workshops, classes, tutorials
logologologologo
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact

RE-INVENTING THE TELEVISION NEWS BUSINESS*

A revolution in video storytelling

Creating entirely new & cost-effective production methods

From the world leaders in video production training and the creators of Character Driven Storytelling™

*and every other business that uses video

WHAT WE DO

Over the past 35 years, we have designed, built or restructured some of the most powerful news and journalism companies in the world.

We replace the traditional TV news ‘crew’ with one highly trained journalist, working alone with nothing but an iPhone.

No more TV news ‘crews’, no editors and no field producers.

This is television news done the way newspaper journalism is done – one reporter with their electronic pad and pencil.

In doing this, we can cut the cost of production by as much as 75% while increasing ratings and audience engagement.

In the place of conventional TV news ‘packages’ – ie, reporter stand up, interview, b-roll, man on the street, we marry great journalism with Netflix and Hollywood storytelling.

It’s a combination that works.

We have taken most of our clients to #1 in their respective markets.

And it’s not just for news. Any company, any profit, any NGO and anyone else who is online needs to tell their story in compelling yet cost-effective video. We can teach you to do that. Either in person or virtually.

EXAMPLES OF WHAT WE CAN TEACH YOUR STAFF TO PRODUCE

ITAY HOD

Itay Hod, MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2018.

Because he works alone, with only an iPhone, he was able to embed himself with a homeless family.

Here’s the story he produced in a one-day turn.

KIET DO

Kiet Do, an MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2021.

Here is a story he produced, all on his own, with only an iPhone and in a one-day turn.

TAYLOR SCHAUB

Taylor Schaub, an MMJ with Spectrum News 1 in LA, took the 5-Day Intensive Video Storytelling Bootcamp in 2023.

Here is a story he turned in only one day, using only an iPhone. It was the first video story he ever did and it was nominated for an Emmy.

THE BOOTCAMP

How do we convert stations and whole networks to working in this way?

Since 1988, we have run intensive 5-Day Video Storytelling Bootcamps

We have done these all over the world.

These are hands-on bootcamps, and participants learn an entirely new way of creating TV news stories.

-We shoot at a 3:1 ratio or lower, so turnaround times are fast.

-We go directly from camera to timelilne and edit – no written scripts.  We work in the medium of pictures and sound.

-We are entirely character-driven.

-We are driven by pictures and real events.

-We are focused almost entirely on ’the viewer experience’.

Since 1988, more than 70,000 journalists around the world have taken our bootcamps, either in person on virtualy.

Case Studies

CBS Case Study Logos
CBS News

We have started to work with CBS News, bringing our ideas of character-driven storytelling to one of the most successful and biggest networks in the United States. Since beginning to work with them ratings have climbed and more importantly, audience engagement is through the ceiling.

Learn More
NYT Case Study Logos
New York Times Television

We started New York Times Television in 1990 and it was the first paper to be brought into the world of TV. It quickly became one of the most successful non-fiction production companies in the United States. The series and documentaries we produced won many awards including multiple Emmys.

Learn More
BBC Case Study Logos
The BBC

We have been working with the BBC since the year 2000 helping to convert their national news network to our visual storytelling technique. Most recently we have trained teams from their sports, documentaries, and comedy divisions to make character-driven stories using only smartphones.

Learn More
Spectrum Case Study Logos
Spectrum News

For the past five years we have worked with Spectrum News to introduce and train their journalists on visual, character driven storytelling using smartphones helping to create a different kind of local news for their network of 24-Hour News Stations across the United States.

Learn More
UN Case Study Logos
The United Nations

In 2006, we were approached by the United Nations. Rather than rely on news outlets, it would be much easier to train the field operatives to produce their own stories. We spent two years working with the UN, training more than 100 of their staff in bootcamps in Geneva and Nairobi.

Learn More
Star Ledger Case Study Logos
The Newark Star-Ledger

We trained 50 print reporters at the paper to shoot and tell their own stories, in conjunction with their print work. We built a TV newsroom in their existing print newsroom – you could not ask for a better set and they began to live stream their stories in conjunction with their print work.

Learn More
Mcgraw Hill Case Study Logos
Mcgraw Hill

We spent two years with McGraw Hill, training more than 150 of their staffers, making them completely video literate. McGraw/Hill media properties we transit included Business Week, Aviation Week, (what was the name of the architecture magazine), and JD Power and Associates.

Learn More
VOA Case Study Logos
Voice of America

In 1990, we were approached by The Voice of America, the official broadcasting agency for the United States Government. When we met with VOA, they were only a short wave radio broadcaster, but working with them, we took them into television, launching VOA-TV.

Learn More
Oyster Case Study Logos
Oyster Yachts

British based Oyster Yachts makes some of the finest yachts in the world. Like every other company, they had to find a way to feed the never-ending video demands of social media – sites like Instagram and TikTok. We trained the Oyster staff to tell their own stories, using only iPhones.

Learn More
SEPA Case Study Logos
Scottish Environmental Protection Agency

We were approached by SEPA, the Scottish Environmental Protection Agency because they had to continually find a way to ‘feed the media beast’. The result was that SEPA was able to tell their own stories, whenever they wanted, and at almost no additional cost.

Learn More
Image 11-11-22 at 6.25 PM

Michael on Media

Michael Rosenblum has been writing about the media since 1988. His work and ideas have appeared in The Guardian, The Huffington Post, Ilkeston Life and many other publications.

He has been blogging regularly for the past 35 years on this subject. Having taught media studies at Columbia University, NYU and now the University of Oxford, he is considered an expert on this subject.

Continue reading this post or look back at previous posts.

Read More

Do You Have Questions About Learning Video Skills?

If you would like to know more about our courses contact us and one of our training advisors will be happy to call you.

Contact Us

Copyright 2024. All rights reserved.