ó
ÉÝ{Tc           @   sj  d  d l  Z  d  d l Z d  d l Z e e j ƒ d k  rN d GHe j d ƒ n  e j Z e j e d d ƒ \ Z Z e d Z e e ƒ d k rœ e d Z	 n g  Z	 d Z
 x> e D]6 \ Z Z e d k rÐ d	 Z
 n  e d
 k r¯ d Z
 q¯ q¯ We  j e e
 e  j ƒ Z d Z xE e	 D]= Z y- e j e d e  j ƒd Ge GHe d Z WqqXqWe j ƒ  d Ge Gd GHd S(   iÿÿÿÿNi   sF   Usage python zippy.py [-a|-w] outputfile [inputfile1] [inputfile2] ...i   t   wai    t   ws   -at   as   -wt   compress_typet   Addedt   Zippedt   files(   t   zipfilet   syst   getoptt   lent   argvt   exitt   argst   optlistt
   outputFilet
   inputFilest   modet   oR   t   ZipFilet   ZIP_DEFLATEDt	   myZipFilet   it   inpt   writet   close(    (    (    s6   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/bin/zippy.pyt   <module>   s8   	
		
