ó
=™xTc           @   sR   d  d l  m Z d  d l m Z d  d l Z d  d l m Z d „  Z d „  Z d S(   iÿÿÿÿ(   t   division(   t   sgtbxN(   t	   cgi_utilsc         C   s   t  j |  d d f ƒ } | S(   Nt   sgsymbolt    t
   convention(   s   sgsymbolR   (   s
   conventionR   (   R   t   inp_from_form(   t   formt   inp(    (    sG   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/web/browse_settings.pyt   interpret_form_data   s    	c         C   sH  d } t  | j j ƒ  ƒ d k rN t j d | j d | j ƒ j ƒ  j ƒ  } n  d } d GHd GHd GHd GHd GHd	 GHx¨ t j ƒ  D]š } | d k s£ | j ƒ  | k r d GHd
 | j ƒ  | j	 ƒ  f GHd t
 j | j ƒ  ƒ } d |  j | ƒ | j ƒ  f GHd | j ƒ  f GH| d 7} q q Wd GH| d k r?d GHd G| GHn  d GHd  S(   Ni    t   symbolt   table_ids   <table border=2 cellpadding=2>s   <tr>s   <th>Space group<br>No.s   <th>Schoenflies<br>symbols   <th>Hermann-Mauguin<br>symbols   <th>Hall<br>symbols   <td>(%d)<td>%ss(   target_module=explore_symmetry&sgsymbol=s   <td><a href="%s">%s</a>s   <td>%si   s   </table>s   <p>s   Number of settings listed:(   t   lenR   t   stripR   t   space_group_infoR   t   typet   numbert   space_group_symbol_iteratort   schoenfliest   urllibt
   quote_plust   universal_hermann_mauguint   scriptt   hall(   t   server_infoR   t   statust	   sg_numbert
   n_settingst   symbolst   query(    (    sG   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/web/browse_settings.pyt   run   s:    		(	   t
   __future__R    t   cctbxR   R   t	   cctbx.webR   R	   R   (    (    (    sG   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/web/browse_settings.pyt   <module>   s
   		