Ñò 9ÝoLc @ sU d Z d d k Z d d k Z d „ Z d d „ Z d d „ Z d „ Z d „ Z d S( sQ Miscellaneous functions/objects used by Cheetah but also useful standalone. iÿÿÿÿNc C s% t i i | d ƒ t i d ƒ d S( Ns i ( t syst stderrt writet exit( t reason( ( s8 /usr/lib64/python2.6/site-packages/Cheetah/Utils/Misc.pyt die s t c C s4 t | t ƒ o t | t ƒ o | | ƒ ‚ n | S( su Raise 'thing' if it's a subclass of Exception. Otherwise return it. Called by: Cheetah.Servlet.cgiImport() ( t isinstancet typet issubclasst Exception( t thingt errmsg( ( s8 /usr/lib64/python2.6/site-packages/Cheetah/Utils/Misc.pyt useOrRaise s t argumentc C sB x; | i ƒ D]- } | | j o t d | | f ƒ ‚ q q Wd S( sˆ Verify no illegal keyword arguments were passed to a function. in : dic, dictionary (**kw in the calling routine). legalKeywords, list of strings, the keywords that are allowed. what, string, suffix for error message (see function source). out: None. exc: TypeError if 'dic' contains a key not in 'legalKeywords'. called by: Cheetah.Template.__init__() s '%s' is not a valid %sN( t keyst TypeError( t dict legalKeywordst whatt k( ( s8 /usr/lib64/python2.6/site-packages/Cheetah/Utils/Misc.pyt checkKeywords s c G s<