a oe@sddlZddlZddlZddlZddlmZddlZddlmZddlm Z m Z ddl m Z m Z mZddZGd d d e jZGd d d e jZGd dde jZdddZdddZddlmZGdddeZGdddZdS)N)pprint) COMException)axdebuggateways) RaiseNotImpl_wrap _wrap_removecCs t}t||t|SN)ioStringIOrstringstripgetvalue)obstreamr@C:\Program Files\Certbot\pkgs\win32comext\axdebug\expressions.pyMakeNiceStrings rc@s eZdZdS)ProvideExpressionContextsN)__name__ __module__ __qualname__rrrrrsrc@s$eZdZddZddZddZdS)ExpressionContextcCs ||_dSr )frame)selfrrrr__init__szExpressionContext.__init__cCstt|j||||tjSr )r ExpressionrrZIID_IDebugExpression)rcoderadixdelimflagsrrrParseLanguageTextsz#ExpressionContext.ParseLanguageTextcCsdS)N)Pythonz&{DF630910-1C1D-11d0-AE36-8C0F5E000000}rrrrrGetLanguageInfo#sz!ExpressionContext.GetLanguageInfoN)rrrrr"r%rrrrrsrc@s<eZdZddZddZddZddZd d Zd d Zd S)rcCs<d|_||_||_||_||_||_d|_d|_tj |_ dS)Nr) callbackrrrr r! isCompleteresultwinerrorZ E_UNEXPECTEDhresult)rrrrr r!rrrr)szExpression.__init__cCszzVzt|j|jj|jj|_Wn.tyNt|j|jj|jjd|_Yn0d|_WnHt t dt d}t tdd|d|_tj|_Yn0Wd|_|nd|_|0dS)NrrcSs |ddS)Nr)srrrDz"Expression.Start.. )evalrr f_globalsf_localsr( SyntaxErrorexecr* tracebackformat_exception_onlysysexc_infor joinmapr)ZE_FAILr'Z onComplete)rr&lrrrStart4s(     zExpression.StartcCs tddS)Nz ** ABORT **)printr$rrrAbortJszExpression.AbortcCs|jSr )r'r$rrrQueryIsCompleteMszExpression.QueryIsCompletecCs|jt|jfSr )r*rr(r$rrrGetResultAsStringPszExpression.GetResultAsStringcCs&tt|j|jd|jtj}|j|fSr )r DebugPropertyrr(r*rIID_IDebugProperty)rr(rrrGetResultAsDebugPropertyTs z#Expression.GetResultAsDebugPropertyN) rrrrr=r?r@rArDrrrrr(s  rc Csg}t|dr*t|dr*t|}|}nt|drHt|j}|j}g}|D]"\}} |t|| ||d||qPtt|tj S)Nitemskeys__dict__r) hasattriterrErGappendGetPropertyInforEnumDebugPropertyInforIID_IEnumDebugPropertyInfo) object dwFieldSpecnRadixiid stackFrameZ name_vals dictionaryZinfosnamevalrrrMakeEnumDebugProperty\s   rVc Csd}}} } } } |tj@r*t|} |tj@r8|}|tj@rz|rLd}n.zt|j}Wntyxtt|}Yn0|tj @r|} |tj @rt |dst |drtj } nd} |tj @rtt||d|||tj} ||| | | | fS)NErrorZhas_keyrGr)rZDBGPROP_INFO_VALUErZDBGPROP_INFO_NAMEZDBGPROP_INFO_TYPEtyperAttributeErrorstrZDBGPROP_INFO_FULLNAMEZDBGPROP_INFO_ATTRIBUTESrHZ"DBGPROP_ATTRIB_VALUE_IS_EXPANDABLEZDBGPROP_INFO_DEBUGPROPrrBrC) ZobnameZobvaluerOrPr*rSrRrTtypvaluefullnameZattribZdbgproprrrrKls4        rK)ListEnumeratorGatewayc@s4eZdZdZejdgZejgZddZ ddZ 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|jSr )lenZ_list_r$rrrr_szEnumDebugPropertyInfo.GetCountcCs|Sr r)rrrrrrszEnumDebugPropertyInfo._wrapN) rrr__doc__r^_public_methods_rrM_com_interfaces_r_rrrrrrLs  rLc@sNeZdZejgZgdZdddZddZdd Z d d Z d d Z ddZ dS)rB)rKGetExtendedInfoSetValueAsString EnumMembers GetParentNrcCs(||_||_||_||_||_||_dSr )rTr\parentr*rSrR)rrTr\rhr*rSrRrrrrs zDebugProperty.__init__cCst|j|j|||jttSr )rKrTr\r*rSrR)rrOrPrrrrKszDebugProperty.GetPropertyInfocCs tddS)NzDebugProperty::GetExtendedInforr$rrrrdszDebugProperty.GetExtendedInfocCs6|jr*|jr*t||jj|jj|j|j<ntddS)NzDebugProperty::SetValueAsString)rRrSr1r2r3rTr)rr\rrrrres  zDebugProperty.SetValueAsStringcCst|j||||jSr )rVr\rR)rrOrPrQrrrrfszDebugProperty.EnumMemberscCs tddS)NzDebugProperty::GetParentrir$rrrrgszDebugProperty.GetParent)NrNN) rrrrrCrcrbrrKrdrerfrgrrrrrBs  rB)N)rNN)r r r8r6rr)Zwin32com.server.exceptionrr+rrutilrrr rrZDebugExpressionContextrZDebugExpressionrrVrKZwin32com.server.utilr^rLrBrrrrs$  4  "