ó
ö™xTc           @   s*  d  d l  m Z e d k r&d  d l m Z d  d l m Z d  d l m Z d Z	 e e	 ƒ Z
 e
 j d d d	 d
 d d d d d d ƒe
 j ƒ  \ Z Z e e ƒ d k r¸ e
 j ƒ  GHq&e j e ƒ Z e e ƒ d k rá d GHq&e e ƒ d k rû d GHq&e j e d e j ƒ d j e j ƒ GHn  d S(   iÿÿÿÿ(   t   divisiont   __main__(   t   OptionParser(   t   dump(   t   ImageSetFactorys/   usage: %prog [options] /path/to/image/files.exts   -os   --output-filet   destt   output_filet   typet   stringt   defaults   imageset.jsont   helps.   Enter a destination filename for serializationi    s!   Error: no imagesets to serialize.i   s.   Error: more than 1 imageset has been specifieds   Serialized imageset to {0}N(   t
   __future__R    t   __name__t   optparseR   t   dxtbx.serializeR   t   dxtbx.imagesetR   t   usaget   parsert
   add_optiont
   parse_argst   optionst   argst   lent
   print_helpt   newt	   imagesetst   imagesetR   t   format(    (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/command_line/serialize.pyt   <module>   s(   