N
σωO5c       s¦   k  Z  k Z k Z k Z k Z d  Z d Z d Z d Z d Z	 d Z
 e e e e e	 e
 g Z d f  d     YZ d   Z e i e i d	 Z d
 Z d   Z d   Z d S(   s   ffs   -fs   f-s   --s   .-s   -.s   Templatec      sn   d   Z  d   Z d   Z d   Z d   Z d   Z d   Z d   Z d	   Z d
   Z	 d   Z
 d   Z RS(   Nc    s   d |  _ |  i   d  S(   Ni    (   s   selfs	   debuggings   reset(   s   selfs/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   __init__Y s    	c    s   d |  i d Sd  S(   Ns   <Template instance, steps=s   >(   s   selfs   steps(   s   selfs/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   __repr__^ s    c    s   g  |  _ d  S(   N(   s   selfs   steps(   s   selfs/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   resetb s    c    s*   t    } |  i | _ |  i | _ | Sd  S(   N(   s   Templates   ts   selfs   stepss	   debugging(   s   selfs   ts/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   cloneg s    	c    s   | |  _ d  S(   N(   s   flags   selfs	   debugging(   s   selfs   flags/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   debugn s    c    s  t  |  t  d  j o t d  n | t j o t d |  n | t j o t d  n |  i g  j o |  i d d t	 j o t d  n | d d j o t
 i d	 |  o t d
  n | d d j o t
 i d |  o t d  n |  i i | | f  d  S(   Ns    s%   Template.append: cmd must be a strings   Template.append: bad kind s-   Template.append: SOURCE can only be prependedi   s'   Template.append: already ends with SINKi    s   fs   \$INs#   Template.append: missing $IN in cmds   \$OUTs$   Template.append: missing $OUT in cmd(   s   types   cmds	   TypeErrors   kinds	   stepkindss
   ValueErrors   SOURCEs   selfs   stepss   SINKs   res   searchs   append(   s   selfs   cmds   kinds/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   appendr s    )%%c    s  t  |  t  d  j o t d  n | t j o t d |  n | t j o t d  n |  i g  j o |  i d d t	 j o t d  n | d d j o t
 i d	 |  o t d
  n | d d j o t
 i d |  o t d  n |  i i d | | f  d  S(   Ns    s&   Template.prepend: cmd must be a strings   Template.prepend: bad kind s+   Template.prepend: SINK can only be appendedi    i   s,   Template.prepend: already begins with SOURCEs   fs   \$INs$   Template.prepend: missing $IN in cmds   \$OUTs%   Template.prepend: missing $OUT in cmd(   s   types   cmds	   TypeErrors   kinds	   stepkindss
   ValueErrors   SINKs   selfs   stepss   SOURCEs   res   searchs   insert(   s   selfs   cmds   kinds/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   prepend s    (%%c    sN   | d j o |  i |  Sn | d j o |  i |  Sn t d |  d  S(   Ns   rs   ws*   Template.open: rw must be 'r' or 'w', not (   s   rws   selfs   open_rs   files   open_ws
   ValueError(   s   selfs   files   rws/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   open s
    c    sm   |  i g  j o t | d  Sn |  i d d t j o t d  n |  i | d  } t i	 | d  Sd  S(   Ns   ri   s)   Template.open_r: pipeline ends width SINKs    (
   s   selfs   stepss   opens   files   SINKs
   ValueErrors   makepipelines   cmds   oss   popen(   s   selfs   files   cmds/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   open_rͺ s    c    sl   |  i g  j o t | d  Sn |  i d d t j o t d  n |  i d |  } t i	 | d  Sd  S(   Ns   wi    i   s,   Template.open_w: pipeline begins with SOURCEs    (
   s   selfs   stepss   opens   files   SOURCEs
   ValueErrors   makepipelines   cmds   oss   popen(   s   selfs   files   cmds/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   open_w³ s    c    s   t  i |  i | |   Sd  S(   N(   s   oss   systems   selfs   makepipelines   infiles   outfile(   s   selfs   infiles   outfiles/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   copyΌ s    c    s:   t  | |  i |  } |  i o | GHd | } n | Sd  S(   Ns   set -x; (   s   makepipelines   infiles   selfs   stepss   outfiles   cmds	   debugging(   s   selfs   infiles   outfiles   cmds/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   makepipelineΏ s
    
(   s   __init__s   __repr__s   resets   clones   debugs   appends   prepends   opens   open_rs   open_ws   copys   makepipeline(    s/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   TemplateV s    													c    s£  g  } x/ | d r% \ } } | i d | | d g  q W| g  j o | i d d d d g  n | d d d !] } } | d d j o |  o  | i d d d d d g  n |  | d d <| d d d !] } } | d d j o | o | i d d d d g  n | | d d <g  } x t	 d t
 |   d r } | | d d } | | d }	 | d d j p |	 d d j o< t i   }
 | i |
  |
 | | d d <| | d <n q<Wxζ | d rά } | ] } } } } | d d j o d	 t |  d
 | } n | d d j o d t |  d
 | } n | d d j o | o | d t |  } n | d d j o | o | d t |  } n | | d <qΝW| d d } xw | d d ri } | d d !] } } | d d j o1 d | j o d | d } n | d | } n | d | } qΘW| o_ d } x$ | d r } | d t |  } qKWd t | d  d } | d | d | } n | Sd  S(   Ni    s    s   cats   --i   i   s   fi   s   OUT=s   ; s   IN=s   -s    <s    >s   { s   ; }s    |
s   
s   rm -fs    s   trap s   ; exits    1 2 3 13 14 15(   s   lists   stepss   cmds   kinds   appends   infiles   inserts   outfiles   garbages   ranges   lens   is   lkinds   rkinds   tempfiles   mktemps   temps   items   infs   outfs   quotes   cmdlists   rmcmds   files   trapcmd(   s   infiles   stepss   outfiles   lists   cmds   kinds   garbages   is   lkinds   rkinds   temps   items   infs   outfs   cmdlists   rmcmds   files   trapcmds/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   makepipelineΗ sh    	   "'	  	 s   !@%_-+=:,./s   "`$\c    s   x& |  d r } | t j o Pn q	 W|  Sd |  j o d |  d Sn d } x5 |  d r+ } | t j o d | } n | | } qU Wd | d Sd  S(   Ni    s   's    s   \s   "(   s   files   cs
   _safecharss   ress   _funnychars(   s   files   cs   ress/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   quotes    	 		 c     s   k  }  d GHt   } | i d d  | i d d  | i d d  | i d d  | i d	  d
 } | i | d  d GHd  S(   Ns
   Testing...s   togif $IN $OUTs   ffs   giftoppms   --s   ppmtogif >$OUTs   -fs   fromgif $IN $OUTi   s&   /usr/local/images/rgb/rogues/guido.rgbs   @temps   Done.(   s   oss   Templates   ts   appends   debugs   FILEs   copy(   s   oss   ts   FILEs/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   test"s    	N(   s   syss   res   oss   tempfiles   strings   FILEIN_FILEOUTs   STDIN_FILEOUTs   FILEIN_STDOUTs   STDIN_STDOUTs   SOURCEs   SINKs	   stepkindss   Templates   makepipelines   letterss   digitss
   _safecharss   _funnycharss   quotes   test(    s/   /var/tmp/python-root/usr/lib/python1.5/pipes.pys   ?? s"   q	F	