³ò
C3IHc        
   @   sý   d  d k  Z e i i ƒ  Z d e d <e d e Z d „  Z d  d k Z d  d k Z	 d  d k
 Z
 d  d k Z d  d k Z d  d k Z d e d ƒ d e d	 ƒ e d
 ƒ Z d e d ƒ d e d ƒ e d ƒ Z d „  Z d e	 i i f d „  ƒ  YZ d S(   iÿÿÿÿNs   Index as tab.t   descriptiont   docc         C   s   |  S(   N(    (   t   x(    (    s    C:\py\_spe\view\documentation.pyt   _   s    s   <h1>t   Errors	   </h1><br>s)   SPE could not generate documentation for s   <b>%s</b>:<br><br><i>%s</i>s6   SPE can't generate documentation of unnamed files.<br>s   Please save your file first.c         C   sC   t  |  ƒ } |  i d ƒ } x! | d D] } t | | ƒ } q& W| S(   Nt   .i   (   t
   __import__t   splitt   getattr(   t   namet   modt
   componentst   comp(    (    s    C:\py\_spe\view\documentation.pyt	   my_import   s     t   Panelc           B   s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         O   s{   t  i i i |  d | d d ƒ|  i d d d d d d	 d
 d d d d d g ƒ | i |  _ |  i i i |  _ d  |  _
 d  S(   Nt   parentt   idiÿÿÿÿt   normal_facet	   helveticat
   fixed_facet   couriert   sizesi   i	   i
   i   i   i   i   (   t   smt   wxpt
   HtmlWindowt   __init__t   SetFontst
   childPanelt   parentPanelt   openListt   opent   Nonet
   moduleName(   t   selfR   t   argst   kwds(    (    s    C:\py\_spe\view\documentation.pyR   $   s
    1c         C   s×   |  i  i t d ƒ ƒ oº yŽ |  i  i } | d j o |  i t ƒ d  Sn t i i | ƒ } t i i	 t i i
 | ƒ ƒ d } | o t i | ƒ n |  i | d ƒ WqÓ t j
 o } |  i | | ƒ qÓ Xn d  S(   NsÉ   SPE will generate now documentation with pydoc.
This implies importing the file. If some files,
are not saved, it's recommended to press Cancel and
save them first before generating any documentation.
t   unnamedi    t    (   R   t   confirmSaveR   t   fileNamet   SetPaget   ERROR_UNNAMEDt   ost   patht   dirnamet   splitextt   basenamet   chdirt   loadDoct	   Exceptiont   error(   R!   R'   R+   R    t   message(    (    s    C:\py\_spe\view\documentation.pyt   main+   s    " c         C   sÊ   | i  ƒ  i d ƒ } t | ƒ d j ok | d } | d j o |  i ƒ  qÆ | d  d j o |  i t i | d ƒ ƒ qÆ |  i |  i | ƒ n4 t | ƒ d j o  | \ } } |  i | | ƒ n d  S(   Ns   .htmli   i    R   i   s   file:i   (	   t   GetHrefR   t   lent   indexR   t
   nturl2patht   url2pathnameR0   R    (   R!   t   linkinfot   hreft   anchorR    (    (    s    C:\py\_spe\view\documentation.pyt   OnLinkClicked>   s    
c         C   s¬   | |  i  j o€ yT t | ƒ } t | ƒ t i i | t i i | | ƒ ƒ } |  i | ƒ | |  _  Wq t j
 o } |  i	 | | ƒ q Xn | o |  i
 | ƒ n d  S(   N(   R    R   t   reloadt   pydoct   htmlt   paget   documentR(   R1   R2   t   LoadPage(   R!   R    R<   t   moduleR   R3   (    (    s    C:\py\_spe\view\documentation.pyR0   L   s    
	c         G   s   |  i  t t | ƒ ƒ d  S(   N(   R(   t   ERRORt   tuple(   R!   R"   (    (    s    C:\py\_spe\view\documentation.pyR2   ^   s    c         C   sÎ   t  i i d d d ƒ } d „  } t d „  t i ƒ } t  i i | | ƒ } d t  i i d d d | ƒ g } h  } x0 t  i ƒ  D]" } | i	 t  i i
 | | ƒ ƒ q€ W| t  i | ƒ d	 } |  i | ƒ d  S(
   Ns?   <big><big><strong>Python: Index of Modules</strong></big></big>s   #ffffffs   #7799eec         S   s   d |  |  f S(   Ns   <a href="%s.html">%s</a>(    (   R	   (    (    s    C:\py\_spe\view\documentation.pyt	   bltinlinke   s    c         S   s
   |  d  j S(   t   __main__(    (   R   (    (    s    C:\py\_spe\view\documentation.pyt   <lambda>g   s    s   <p>s   Built-in Moduless   #ee77aas€   <p align=right>
<font color="#909090" face="helvetica, arial"><strong>
pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>(   R?   R@   t   headingt   filtert   syst   builtin_module_namest   multicolumnt
   bigsectiont   pathdirst   appendR7   t   joinR(   (   R!   RJ   RG   t   namest   contentst   indicest   seent   dir(    (    s    C:\py\_spe\view\documentation.pyR7   a   s     			  (   t   __name__t
   __module__R   R4   R=   R0   R2   R7   (    (    (    s    C:\py\_spe\view\documentation.pyR   #   s   					(   t	   _spe.infot   _spet   infot   copyt   INFOt   __doc__R   t   wxt   sm.wxpR   R*   R8   RL   R?   RE   R)   R   R   R   R   (    (    (    s    C:\py\_spe\view\documentation.pys   <module>   s   
	$	