a „oeã@säddlZddlZddlZddlZddlmZddlZddlmZddlm Z m Z ddl m Z m Z mZdd„ZGd d „d e jƒZGd d „d e jƒZGd d„de jƒZddd„Zddd„ZddlmZGdd„deƒZGdd„dƒZdS)éN)Úpprint)Ú COMExceptioné)ÚaxdebugÚgateways)Ú RaiseNotImplÚ_wrapÚ _wrap_removecCs t ¡}t||ƒt | ¡¡S©N)ÚioÚStringIOrÚstringÚstripÚgetvalue)ÚobÚstream©rú@C:\Program Files\Certbot\pkgs\win32comext\axdebug\expressions.pyÚMakeNiceStrings rc@s eZdZdS)ÚProvideExpressionContextsN)Ú__name__Ú __module__Ú __qualname__rrrrrsrc@s$eZdZdd„Zdd„Zdd„ZdS)ÚExpressionContextcCs ||_dSr )Úframe)ÚselfrrrrÚ__init__szExpressionContext.__init__cCstt|j||||ƒtjƒSr )rÚ ExpressionrrZIID_IDebugExpression)rÚcodeÚradixÚdelimÚflagsrrrÚParseLanguageTextsþz#ExpressionContext.ParseLanguageTextcCsdS)N)ÚPythonz&{DF630910-1C1D-11d0-AE36-8C0F5E000000}r©rrrrÚGetLanguageInfo#sz!ExpressionContext.GetLanguageInfoN)rrrrr"r%rrrrrsrc@s<eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd S)rcCs<d|_||_||_||_||_||_d|_d|_tj |_ dS)Nr) Úcallbackrrrr r!Ú isCompleteÚresultÚwinerrorZ E_UNEXPECTEDÚhresult)rrrrr r!rrrr)szExpression.__init__cCsÈz²zVzt|j|jj|jjƒ|_Wn.tyNt|j|jj|jjƒd|_Yn0d|_WnHt   t   ¡dt   ¡d¡}t  tdd„|ƒd¡|_tj|_Yn0Wd|_| ¡nd|_| ¡0dS)NÚrrcSs |dd…S)Néÿÿÿÿr)ÚsrrrÚDóz"Expression.Start..Ú )ÚevalrrÚ f_globalsÚf_localsr(Ú SyntaxErrorÚexecr*Ú tracebackÚformat_exception_onlyÚsysÚexc_infor ÚjoinÚmapr)ZE_FAILr'Z onComplete)rr&ÚlrrrÚStart4s(ÿ    ÿ ÿzExpression.StartcCs tdƒdS)Nz ** ABORT **)Úprintr$rrrÚAbortJszExpression.AbortcCs|jSr )r'r$rrrÚQueryIsCompleteMszExpression.QueryIsCompletecCs|jt|jƒfSr )r*rr(r$rrrÚGetResultAsStringPszExpression.GetResultAsStringcCs&tt|j|jd|jƒtjƒ}|j|fSr )rÚ DebugPropertyrr(r*rÚIID_IDebugProperty)rr(rrrÚGetResultAsDebugPropertyTs þz#Expression.GetResultAsDebugPropertyN) rrrrr=r?r@rArDrrrrr(s  rc Cs„g}t|dƒr*t|dƒr*t| ¡ƒ}|}nt|dƒrHt|j ¡ƒ}|j}g}|D]"\}} | t|| ||d||ƒ¡qPtt|ƒtj ƒS)NÚitemsÚkeysÚ__dict__r) ÚhasattrÚiterrErGÚappendÚGetPropertyInforÚEnumDebugPropertyInforÚIID_IEnumDebugPropertyInfo) ÚobjectÚ dwFieldSpecÚnRadixÚiidÚ stackFrameZ name_valsÚ dictionaryZinfosÚnameÚvalrrrÚMakeEnumDebugProperty\s   ÿrVc Csæd}}} } } } |tj@r*t|ƒ} |tj@r8|}|tj@rz|rLd}n.zt|ƒj}Wntyxtt|ƒƒ}Yn0|tj @rˆ|} |tj @r²t |dƒs¦t |dƒr®tj } nd} |tj @rÖtt||d|||ƒtjƒ} ||| | | | fS)NÚErrorZhas_keyrGr)rZDBGPROP_INFO_VALUErZDBGPROP_INFO_NAMEZDBGPROP_INFO_TYPEÚtyperÚAttributeErrorÚstrZDBGPROP_INFO_FULLNAMEZDBGPROP_INFO_ATTRIBUTESrHZ"DBGPROP_ATTRIB_VALUE_IS_EXPANDABLEZDBGPROP_INFO_DEBUGPROPrrBrC) ZobnameZobvaluerOrPr*rSrRrTÚtypÚvalueÚfullnameZattribZdbgproprrrrKls4       ÿ þrK)ÚListEnumeratorGatewayc@s4eZdZdZejdgZejgZdd„Z dd„Z dS)rLaA class to expose a Python sequence as an EnumDebugCodeContexts Create an instance of this class passing a sequence (list, tuple, or any sequence protocol supporting object) and it will automatically support the EnumDebugCodeContexts interface for the object. ÚGetCountcCs t|jƒSr )ÚlenZ_list_r$rrrr_�szEnumDebugPropertyInfo.GetCountcCs|Sr r)rrrrrr szEnumDebugPropertyInfo._wrapN) rrrÚ__doc__r^Ú_public_methods_rrMÚ_com_interfaces_r_rrrrrrL‘s  rLc@sNeZdZejgZgd¢Zddd„Zdd„Zdd „Z d d „Z d d „Z dd„Z dS)rB)rKÚGetExtendedInfoÚSetValueAsStringÚ EnumMembersÚ GetParentNrcCs(||_||_||_||_||_||_dSr )rTr\Úparentr*rSrR)rrTr\rhr*rSrRrrrr®s zDebugProperty.__init__cCst|j|j|||jttƒSr )rKrTr\r*rSrR)rrOrPrrrrK¸sùzDebugProperty.GetPropertyInfocCs tdƒdS)NzDebugProperty::GetExtendedInfo©rr$rrrrdÃszDebugProperty.GetExtendedInfocCs6|jr*|jr*t||jj|jjƒ|j|j<ntdƒdS)NzDebugProperty::SetValueAsString)rRrSr1r2r3rTr)rr\rrrrreÆs  ÿzDebugProperty.SetValueAsStringcCst|j||||jƒSr )rVr\rR)rrOrPrQrrrrfÎsÿzDebugProperty.EnumMemberscCs tdƒdS)NzDebugProperty::GetParentrir$rrrrgÔszDebugProperty.GetParent)NrNN) rrrrrCrcrbrrKrdrerfrgrrrrrB¤s ÿ  rB)N)rNN)r r r8r6rr)Zwin32com.server.exceptionrr+rrÚutilrrr rrZDebugExpressionContextrZDebugExpressionrrVrKZwin32com.server.utilr^rLrBrrrrÚs$  4 ÿ "