-í
š´§Ec       s•      d  k  Z  d  k Z  d  k Z  d  k Z  d  k i Z  d k l Z 
 d g a	  g  d „ Z
  h  e d „ Z { h  e d „ Z d  S(   N(   s   DataStoreInterfaces   .c    s      |  a d  S(   N(   s   paths   _includePath(   s   path(    (    s   psp.pys   setIncludePath s   c    sy    ! | e j o " e } n $ e i |  d ƒ } % | d j o & |  Sn ' |  | d } ) e i |  d | ƒ } * | d j o + |  |  Sn - |  |  } . |  | d | !} / |  | d } 1 | d j o 3 | e | | | ƒ Sn~5 | d j o¨7 e | | ƒ } ; e | ƒ e i j o < | g } n > | } ? x:| D? ]/}
 A |
 e j o
 B qVn D e |
 ƒ }
 E e } I |
 d d	 j o' J e i i |
 ƒ o K |
 } n nR M xK | DM ]@ } N d
 | |
 f }	 O e i i |	 ƒ o P |	 } Q Pn qÖWS | e j o T e d | ‚ n Z e | d ƒ } [ | i ƒ  } \ | i ƒ  ] | e | | | ƒ 7} qVW_ | e | | | ƒ 7} ` | SnÆ b | d j o& d | | Ue | e | | | ƒ Sn g | d j o. k | e e | | ƒ ƒ e | | | ƒ SnR o | d j o. s | e  e | | ƒ ƒ e | | | ƒ Sn x e d | f ‚ d S(   s’  Parses text looking for tags in the spirit of ASP tags and evaluates
    them.  The contexts of the tags are passed to the Python interpreter.
    The page, after evaluating the tags, is returned as the result of this 
    function.  Two type of tags are supported: '<%!...%>'  and '<%=...%>'.
    The contents of the '!' style tags are exec'd and the tag
    is removed from the original page.  The contents of the '=' style tags
    are eval'd and a string representation of the result is placed inline
    in the original text in place of the tag.  The provided namespace is 
    used by the Python interpreter.  Using the default parameter for this
    value causes a unique namespace to be created and used for each call.
    This implies that multiple tags w/in the same page (passed in text)
    share the namespace.  In other words one tag can create global values 
    that can be used by later tags.
    s   <%iÿÿÿÿi   s   %>i   s   #s   @i    s   /s   %s/%ss$   file %s in PSP include tag not founds   rs   !s   =s   -s   invalid psp tag %sN(!   s   includePaths   Nones   _includePaths   strings   finds   pages   p1s   cmds   p2s   sub1s   sub2s   sub3s   evalPages	   namespaces   evals   valuess   types   typess   ListTypes   ress   vals   strs   fnames   oss   paths   existss   temps   RuntimeErrors   opens   fs   reads   closes   repr(   s   pages	   namespaces   includePaths   sub2s   sub1s   paths   sub3s   p2s   p1s   temps   vals   fs   ress   cmds   valuess   fname(    (    s   psp.pys   evalPage sf   	
 	
	
 		..c    sG   {  € t  | d < t | d <‚ t i | d <ƒ t |  | | ƒ Sd S(   sÌ   Same as eval but augments the namespace to include things
    that will be common to render script evaluation.  As an example,
    a get function will be added that retrieves data from the DataStore.
    s   rsutils   dss   dsmN(   s   rsutils	   namespaces   DataStoreInterfaces   twcs	   dsmarshals   evalPages   pages   includePath(   s   pages	   namespaces   includePath(    (    s   psp.pys   evalRenderScript{ s
   (   s   os.paths   oss   strings   typess   twc.dsmarshals   twcs
   twc.rsutils   rsutils   DataStoreInterfaces   _includePaths   setIncludePaths   Nones   evalPages   evalRenderScript(	   s   twcs   strings   DataStoreInterfaces   evalPages   evalRenderScripts   oss   rsutils   typess   setIncludePath(    (    s   psp.pys   ? s   j