ó
á™xTc           @   s{   d  d l  m Z d  d l Z d  d l m Z d  d l m Z d  d l Z d d d „ Z
 e d k rw e
 e j d ƒ n  d S(	   iÿÿÿÿ(   t   divisionN(   t   Sorry(   t   option_parsers   libtbx.philc   	         s5  t  |  ƒ d k r d g }  n  t d d | ƒ j d  d d d d d	 ƒj d  d
 d d d d ƒj d  d d d d d ƒj d  d d d d d ƒj d  d d d d d ƒj d  d d d d d d d d d ƒj d  d d d d d d d d d ƒj d |  ƒ } | j ‰ d ‰  ˆ j rd ‰  n$ ˆ j r0d  ‰  n ˆ j rBd! ‰  n  ˆ j	 ‰ | j
 } ‡ ‡ f d" †  } ‡  ‡ ‡ f d# †  } ˆ j sÄxª | D]2 } ˆ j ƒ  GH| d$ | d% | ƒ ƒ ˆ j ƒ  GHq‹Wnm t  | ƒ d  k  råt d& ƒ ‚ n  | d% | d ƒ } | d$ | j d' g  | d! D] } | d% | ƒ ^ qƒ ƒ d  S((   Ni    s   --helpt   usages   %s [options] parameter_file ...s   --difft   actiont
   store_truet   helpsk   Display only differences between the first file (master) and the combined definitions from all other files.s   --show_helps-   Display help for each parameter if available.s   --show_some_attributess2   Display non-default attributes for each parameter.s   --show_all_attributess*   Display all attributes for each parameter.s   --process_includess   Inline include files.s   --print_widtht   storet   typet   ints   Width for outputt   metavart   INTs   --print_prefixt   stringt   defaultt    s   Prefix string for outputt   argsi   i   i   c            s"   t  j j d |  d ˆ d ˆ  j ƒ S(   Nt	   file_namet   converter_registryt   process_includes(   t   libtbxt   philt   parseR   (   R   (   t   coR   (    sF   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/phil.pyR   0   s    c      	      s,   |  j  d t j d ˆ d ˆ  d ˆ j ƒ d  S(   Nt   outt   prefixt   attributes_levelt   print_width(   t   showt   syst   stdoutR   (   t   scope(   R   R   R   (    sF   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/phil.pyR   5   s
    		R   R   s/   Option --diff requires at least two file names.t   sources(   t   lenR   t   optiont   Nonet   processt   optionst   show_all_attributest   show_some_attributest	   show_helpt   print_prefixR   t   difft   rstripR   t
   fetch_diff(	   R   t   command_nameR   t   command_linet
   file_namesR   R   R   t   master(    (   R   R   R   R   sF   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/phil.pyt   run   sj     																								t   __main__i   (   t
   __future__R    t   libtbx.philR   t   libtbx.utilsR   t   libtbx.option_parserR   R   R"   R0   t   __name__t   argv(    (    (    sF   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/phil.pyt   <module>   s   A