tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
]\¬Qc@sÍdZddlmZedddƒddlZddlZddlmZddlTdd    lmZdd
lm    Z    ddl
Tddl Z d dd „ƒYZ e d krÉe ƒjƒdGejGHndS(s`argvemulator - create sys.argv from OSA events. Used by applets that
want unix-style arguments.
iÿÿÿÿ(twarnpy3ks+In 3.x, the argvemulator module is removed.t
stackleveliN(tAE(t*(tEvt(tFilet ArgvCollectorcBsbeZdZd„Zd„Zed d„Zed d„Zd„Zd„Z    d    „Z
d
„Z RS( s*A minimal FrameWork.Application-like classcCsrd|_ttjƒdkrBtjdd dkrBtjd=ntjtt|jƒtjtt    |j
ƒdS(Niiis-psn( tquittingtlentsystargvRtAEInstallEventHandlertkCoreEventClasstkAEOpenApplicationt_ArgvCollector__runapptkAEOpenDocumentst_ArgvCollector__openfiles(tself((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyt__init__s
    , cCs$tjttƒtjttƒdS(N(RtAERemoveEventHandlerR R R(R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pytclosesii<cCsbtjƒ|}x0|j rBtjƒ|krB|j||ƒqW|jsTdGHn|jƒdS(Ns+argvemulator: timeout waiting for arguments(Rt    TickCountRt _dooneeventR(Rtmaskttimeouttstoptime((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pytmainloop"s     cCs2tj||ƒ\}}|r.|j|ƒndS(N(Rt WaitNextEventt_lowlevelhandler(RRRtgottevent((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyR/sc Cs¨|\}}}}}|\}}|tkr›ytj|ƒWnVtjk
r–}    dt|ƒt||d>Bƒf}
dG|    GHdG|
GHtjƒnXdSdG|GHdS(NsHigh Level Event: %r %ris
AE error: tinsUnhandled event:(tkHighLevelEventRtAEProcessAppleEventtErrorthext    tracebackt    print_exc( RRtwhattmessagetwhentwheret    modifiersthtvterrtmsg((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyR4s  $        cCs d|_dS(Ni(R(R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyt_quitDscCs|jƒdS(N(R/(Rt requesteventt
replyevent((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyt__runappGsc CsÐy‘|jttƒ}xxt|jƒƒD]d}|j|dtƒd}tjd|j    ƒ}|j
dƒd}|j ƒ}t jj|ƒq(WWn.tk
rÁ}    dGHddl}
|
jƒnX|jƒdS(Nitrawdatais<argvemulator.py warning: can't unpack an open document eventiÿÿÿÿ(tAEGetParamDesctkeyDirectObjectt
typeAEListtranget AECountItemst AEGetNthDesct    typeAliasRtAliastdatatFSResolveAliastNonet as_pathnameR    R
tappendt    ExceptionR$R%R/( RR0R1tlistdesctit    aliasdesctaliastfsreftpathnameteR$((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyt __openfilesJs  i<i<( t__name__t
__module__t__doc__RRthighLevelEventMaskRRRR/RR(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyRs                         t__main__s    sys.argv=((RLtwarningsRR    R$tCarbonRtCarbon.AppleEventsRRt Carbon.EventstaetoolsRRJRR
(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/argvemulator.pyt<module>s  
 
 I