ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
^c           @   s   d  Z  d d l Z d d l m Z d d l Z d d l Z d d l Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z e d k r e   n  d S(   sQ   Compare local and remote dictionaries and transfer differing files -- like rdist.iN(   t   reprc          C   s-  t  j   }  t d |   } | r> t  j |  t  j   }  n  t d d  } d } d } d } d GHt d |  } | r | } n  | | f } t j   } t j   } t j | |  }	 t	 | |	 |  |	 j
   | j
   t j   }
 |
 | } t | d	  \ } } | Gd
 Gt |  Gd GHt d  d  S(   Ns   chdir [%s] t   hosts   voorn.cwi.nli  i   t    s  Mode should be a string of characters, indicating what to do with differences.
r - read different files to local file system
w - write different files to remote file system
c - create new files, either remote or local
d - delete disappearing files, either remote or local
s
   mode [%s] i<   s   minutes andt   secondss   [Return to exit] (   t   ost   getcwdt	   raw_inputt   chdirt   askt   timet   FSProxyt   FSProxyLocalt   FSProxyClientt   comparet   _closet   divmodt   round(   t   pwdt   sR   t   portt   verboset   modet   addresst   t1t   localt   remotet   t2t   dtt   minst   secs(    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyt   main	   s2     	


c         C   s    t  d |  | f  } | p | S(   Ns   %s [%s] (   R   (   t   promptt   defaultR   (    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyR   )   s    c         C   s3   t  d |  t |  f  } | r/ t j |  S| S(   Ns   %s [%s] (   R   t   strt   stringt   atoi(   R   R    R   (    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyt   askint-   s     c         C   s  Hd Gt  t j    GH| j d  } | j d  } | j   d GHi  } x$ |  j   D] \ } } | | | <qV Wd GH| j |  } d Gt |  GHi  }	 x| D]\ } }
 |
 |	 | <| j |  st  |  Gd GHd | k rd	 | k rt	 |  | |  qq | | } | |
 k r t  |  G| j
 |  } |  j
 |  } | | k rrd
 Gd | k rt	 |  | |  qn6 | | k rd Gd | k rt |  | |  qn d GHq q Wx | j   D] } |	 j   st  |  Gd Gt   d | k rd	 | k rt |  | |  n- d | k r<d | k r<t j |  d GHn  HqqWd GH| j |  } g  } x | D] } |  j |  rd Gt  |  GH| j |  qed Gt  |  Gd GHd | k red	 | k red t  |  } d | k rd } n t | d  } | d  d k r7|  j |  d t  |  GH| j |  q7qeqeW|  j   } x0 | D]( } | | k rNd Gt  |  Gd GHqNqNWx[ | D]S } d Gt  |  GH|  j |  | j |  t |  | |  | j   |  j   qWd  S(   Ns   PWD =t   sumlistt   listsubdirss   calculating local sums ...s   getting remote sums ...t   gots   only remotet   rt   cs   remote newers   local newert   ws    same mtime but different sum?!?!s   only locallyt   ds   removed.s   gettin subdirs ...s   Common subdirectorys   Remote subdirectorys   not found locallys"   Create local subdirectory %s? [y] t   yi   t   Ys   Subdirectory %s mades   Local subdirectorys   not found remotelys   Entering subdirectory(   R,   R-   (   R    R   R   t   _sendt   _flushR%   t   _recvt   lent   has_keyt   recvfilet   mtimet   sendfilet   keyst   flt   unlinkt   isdirt   appendR   t   mkdirR&   t   cdR   t   back(   R   R   R   t   sums_idt
   subdirs_idt   lsumdictt   namet   infot   sumst   rsumdictt   rsumt   lsumt   rmtimet   lmtimet   subdirst   commont   prt   okt   lsubdirs(    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyR   2   s    



	
c         C   s   y | j  |  Wn& t t j f k
 r9 } d G| GHd  SXd Gt   t |  j   } t j   } | j d | |  | j	   t j   } | | } t
 |  Gd Gt |  Gd G| r d Gt t
 |  |  Gd Gn  Hd  S(   Ns   cannot create:s   sending ...t   writes   bytes inR   s   i.e.s	   bytes/sec(   t   createt   IOErrorR   t   errorR7   t   opent   readR	   t   _send_noreplyR/   R1   R   (   R   R   RA   t   msgt   dataR   R   R   (    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyR5      s"    	

c         C   sP   d } z  t  |  | |  } d } | SWd  | sK d | f GH|  j |  n  Xd  S(   Ni    i   s#   *** recvfile of %r failed, deleting(   t   recvfile_realt   delete(   R   R   RA   RL   t   rv(    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyR3      s    c         C   sc  y |  j  |  Wn& t t j f k
 r9 } d G| GHd  SXd Gt   t | d  } t j   } d } d } | j d | | |  } | j   xe | | }	 | j d | |	 |  }
 | j	 |  } |
 } | s Pn  | j
 |  | j |  |	 } q W| j   } t j   } | j   | | } | Gd Gt |  Gd	 G| rQd
 G| | Gd Gn  H| j	 |  d  S(   Ns   cannot create:s   receiving ...R*   i   i   i    RS   s   bytes inR   s   i.e.s	   bytes/seci   (   RO   RP   R   RQ   R7   RR   R	   R.   R/   R0   t   seekRN   t   tellt   closeR   (   R   R   RA   RU   t   fR   t   lengtht   offsett   idt	   newoffsett   newidRV   t   sizeR   R   (    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyRW      s@    	

 


c           C   s   t  j j   d  S(   N(   t   syst   stdoutt   flush(    (    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyR7      s    t   __main__(   t   __doc__Rd   R    R
   R	   R   R   R   R$   R   R5   R3   RW   R7   t   __name__(    (    (    s*   /usr/lib64/python2.7/Demo/pdist/cmptree.pyt   <module>   s   	 			P			&	