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
27
28
29
30
31
32
]\¬Qc@sÒdZddlmZedddƒddlmZddlZddlZddlZddlZde    fd    „ƒYZ
d
e fd „ƒYZ ddd „Zd d„Zd d„Zd„Zd d„ZdS(s@macresource - Locate and open the resources needed for a script.iÿÿÿÿ(twarnpy3ks*In 3.x, the macresource module is removed.t
stackleveli(tResNt ArgumentErrorcBseZRS((t__name__t
__module__(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pyR stResourceFileNotFoundErrorcBseZRS((RR(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pyR sc
Csè|dkr$|dkr$td‚nt|ƒtdƒkrpytj||ƒ}Wntjk
rhq¡XdSn1ytj||ƒ}Wntjk
rœnXdS|sÚd|krÍ|jdƒdd}qÚ|d}ng}|dkrûtj    g}n|t
j krDt
j |}t |dƒrDtj j|jƒg}qDn|jt
j ƒxB|D]1}tj j||ƒ}tj j|ƒr[Pq[q[Wt|‚t|ƒ}    t|ƒtdƒkrÒtj||ƒ}ntj||ƒ}|    S(    s™Open a resource file, if needed. restype and resid
    are required parameters, and identify the resource for which to test. If it
    is available we are done. If it is not available we look for a file filename
    (default: modname with .rsrc appended) either in the same folder as
    where modname was loaded from, or otherwise across sys.path.
 
    Returns the refno of the resource file opened (or None)s;Either filename or modname argument (or both) must be givenit.iÿÿÿÿs.rsrct__main__t__file__N(tNoneRttypeRt GetResourcetErrortGetNamedResourcetsplittostcurdirtsystmodulesthasattrtpathtdirnameR    textendtjointexistsRt open_pathname(
trestypetresidtfilenametmodnametht
searchdirstmodtdirtpathnametrefno((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pytneedsF               icCswytj|ddƒ}Wn,tjk
rG}|ddkrL‚qLnX|St|d|ƒ}tj|ddƒ}dS(sQOpen a resource file given by pathname, possibly decoding an
    AppleSingle fileuiii9ÿÿÿtverboseN(RtFSOpenResourceFileR t_decode(R#R&R$targ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pyRMs
cCsbytj|ddƒ}Wn,tjk
rG}|ddkrL‚qLnX|St|d|ƒ}|S(s©Return the pathname for a resource file (either DF or RF based).
    If the pathname given already refers to such a file simply return it,
    otherwise first decode it.uiii9ÿÿÿR&(RR'R R((R#R&R$R)((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pytresource_pathname_s
cCstdddddtƒdS(sNOpen the resource file containing the error code to error message
    mapping.tEstriRs errors.rsrcRN(R%R(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pytopen_error_resourcerscCsà|d}tjj|ƒrDtj|ƒjtj|ƒjkrD|Sttdƒr tjtjj|ƒtjtj    Bƒ r ddl
}|j dƒ\}}n|rºdG|GdG|GHnddl }|j ||ddƒ|S(    Ns.df.rsrctaccessiÿÿÿÿs.rsrctDecodingttotresonlyi(RRRtstattst_mtimeRR-RtW_OKtX_OKttempfiletmkstempt applesingletdecode(R#R&t newpathnameR5tfdR7((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pyR(ws
$)  (t__doc__twarningsRtCarbonRRRtMacOSt
macostoolst    TypeErrorRt ImportErrorRR
R%RR*R,R((((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/plat-mac/macresource.pyt<module>s    >