ok
Direktori : /proc/self/root/proc/self/root/proc/thread-self/root/lib64/python2.7/Tools/scripts/ |
Current File : //proc/self/root/proc/self/root/proc/thread-self/root/lib64/python2.7/Tools/scripts/ftpmirror.pyc |
� iцdc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d � Z d a d a d a d a d a d d d g Z d � Z d � Z d � Z d d d � � YZ d � Z d � Z d � Z e d k r� e � n d S( s� Mirror a remote ftp subtree into a local directory tree. usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat] [-l username [-p passwd [-a account]]] hostname[:port] [remotedir [localdir]] -v: verbose -q: quiet -i: interactive mode -m: macintosh server (NCSA telnet 2.4) (implies -n -s '*.o') -n: don't log in -r: remove local files/directories no longer pertinent -l username [-p passwd [-a account]]: login info (default .netrc or anonymous) -s pat: skip files matching pattern hostname: remote host w/ optional port separated by ':' remotedir: remote directory (default initial) localdir: local directory (default current) i����N( t fnmatchc G s8 t j t _ x | D] } | GHq Wt GHt j d � d S( Ni ( t syst stderrt stdoutt __doc__t exit( t argst msg( ( s/ /usr/lib64/python2.7/Tools/scripts/ftpmirror.pyt usage s i i t .s ..s .mirrorinfoc C s� y# t j t j d d � \ } } Wn t j k rE } t | � n Xd } d } d } | sk t d � n | d } d } d | k r� | j d d � \ } } t | � } n y7 t j � j | � } | d k r� | \ } } } n Wn t j t f k rn Xx| D]� \ } } | d k r*| } n | d k r?| } n | d k rT| } n | d k rmt d a n | d k r�d a n | d k r�d a n | d k r�d a d a t j d � n | d k r�d a n | d k r�d a n | d k r t j | � q q Wd } d } | d rZ| d } | d rZ| d } | d rWt d � qWqZn t j � } t r�d | | r�d | p�d f GHn | j | | � t s�t r�d | p�d GHn | j | | | � n t r�d GHn | j � } t d k r d Gt | � GHn | r|t d k r.d t | � GHn | j | � t d k rOd GHn | j � } t d k r|d Gt | � GHq|n t | | � d S( Ni s a:bil:mnp:qrs:vt s hostname missingi t :s -ls -ps -as -vs -qs -is -ms *.os -ns -rs -si i s too many argumentss Connecting to '%s%s'...s :%ds Logging in as %r...t anonymouss OK.s PWD =s cwd(%s)( t getoptR t argvt errorR t splitt intt netrct authenticatorst Nonet NetrcParseErrort IOErrort verboset interactivet mact nologint skippatst appendt rmokt ftplibt FTPt connectt logint pwdt reprt cwdt mirrorsubdir( t optsR R R! t passwdt accountt hostt portt autht ot at remotedirt localdirt fR"