eU2SrSSKrSSKrSSKrSSKrSSKrSS/r\"\5r "SS\ 5r "SS\ 5r SS jr SS jr\4S jr"S S \5rSSjrSSjr\4SjrSrSSjr\S:XaK\"\R45S:a\"S\R8S9 g\R4S \"\R4S5 gg)aZrunpy.py - locating and running Python code using the module namespace Provides support for locating and running Python scripts using the Python module namespace instead of the native filesystem. This allows Python code to play nicely with non-filesystem based PEP 302 importers when locating support scripts as well as when importing modules. N run_modulerun_pathc*\rSrSrSrSrSrSrSrg) _TempModulezCTemporarily replace a module in sys.modules with an empty namespacec>Xl[U5Ul/UlgN)mod_name ModuleTypemodule _saved_moduleselfr s +/opt/imh/python3.13/lib/python3.13/runpy.py__init___TempModule.__init__s  * cURnURR[RU5 UR [RU'U$![ a N+f=fr )r r appendsysmodulesKeyErrorr rs r __enter___TempModule.__enter__!sZ==     % %ckk(&; <!%  H    s,A A&%A&cUR(a+URS[RUR'O[RUR /UlgNr)r rrr rargss r__exit___TempModule.__exit__*s@   )-););A)>CKK & DMM*r)r r r N) __name__ __module__ __qualname____firstlineno____doc__rrr__static_attributes__rrrrsM  rrc&\rSrSrSrSrSrSrg)_ModifiedArgv01c<Xl[5=UlUlgr )valueobject _saved_value _sentinel)rr,s rr_ModifiedArgv0.__init__2s -3X5DNrcURURLa [S5e[RSUlUR [RS'g)NzAlready preserving saved valuer)r.r/ RuntimeErrorrargvr,)rs rr_ModifiedArgv0.__enter__6sA   DNN 2?@ @HHQKjj rc`URUlUR[RS'gr)r/r,r.rr3rs rr_ModifiedArgv0.__exit__<s ^^ '' r)r.r/r,N)r!r"r#r$rrrr&r'rrr)r)1s6! (rr)c UbURU5 UcSnUnSn O3URnURnURn Uc URnURUUU SUUUS9 [ X5 U$)z)Helper to run code in nominated namespaceN)r!__file__ __cached__r% __loader__ __package____spec__)updateloaderorigincachedparentexec) code run_globals init_globalsr mod_specpkg_name script_namer>fnamer@s r _run_coderJAs<(  H("'$*!%$*%-"* ,  rc >UcUO URn[U5n[U5 URRn[ XUX#XE5 SSS5 SSS5 WR 5$!,(df  N&=f!,(df  WR 5$=f)z5Helper to run code in new namespace with sys modifiedN)r?rr)r __dict__rJcopy) rCrEr rFrGrHrI temp_module mod_globalss r_run_module_coderP[s$+KE X +~e/D!((11 $\h =0E      0E/D      s" A?%A.A?. A< 8A?? Bc URS5(aU"S5eURS5un nU(ae[U5 [ R RU5nUb7[US5(d&SSK J n SRXS9nU"[U55 [RRU5nUc U"SU-5eUR,b5US:XdUR'S5(aU"S5eUS-n [/X5$UR0n U c U"SU-5eU R3U5n U c U"SU-5eXU 4$![aLnURb3URU:wa$URURS-5(deSnAGNXSnAff=f![[ ["[$4aYn SnUR'S 5(aUS USS S US 3- nU"URU[)U 5R*U 55U eSn A ff=f!Ua*nU[ R ;aeU"U<SU<S35eSnAff=f![anU"[U55UeSnAff=f)N.z#Relative module names not supported__path__r)warnz{mod_name!r} found in sys.modules after import of package {pkg_name!r}, but prior to execution of {mod_name!r}; this may result in unpredictable behaviour)r rGz:Error while finding module specification for {!r} ({}: {})z.pyz . Try using 'z' instead of 'z' as the module name.zNo module named %s__main__z .__main__z%Cannot use package as __main__ modulez; z- is a package and cannot be directly executedz0%r is a namespace package and cannot be executedzNo code object available for %s) startswith rpartition __import__ ImportErrornamerrgethasattrwarningsrTformatRuntimeWarning importlibutil find_specAttributeError TypeError ValueErrorendswithtyper!submodule_search_locations_get_module_detailsr>get_code) r errorrG_eexistingrTmsgspecex pkg_main_namer>rCs rrjrjis39::((-NHa  x ;;??8,  *(E(E %#FHFH  $ % I~~''1 |(8344 &&2 z !X%6%6{%C%C?@ @ G${2M&}< < [[F ~FCKLM M&x( |5@AA 4 g vv~!&&H"4 ++AFFSL99  & J ?IK   U # # mHSbM?3 z!68 9CCJJxb):):B?@bHI" Gs{{*9:HFG G G &F1IA%&sa E!F'H+I F$AFF$'HAHHI #%II  I1I,,I1c\rSrSrSrSrg)_ErrorzBError that _run_module_as_main() should report without a tracebackr'N)r!r"r#r$r%r&r'rrrurusLrrucU(dUS:wa[U[5upnO[[5upn[R SRnU(aWR[RS'[WUSSW5$![a7n[R<SU<3n[R "U5 SnANSnAff=f)aRuns the designated module in the __main__ namespace Note that the executed module will have full access to the __main__ namespace. If this is not desirable, the run_module() function should be used to run the module code in a fresh namespace. At the very least, these variables in __main__ will be overwritten: __name__ __file__ __cached__ __loader__ __package__ rVz: Nr) rjru_get_main_module_detailsr executableexitrrLr?r3rJ)r alter_argvrFrCexcrp main_globalss r_run_module_as_mainr~s Z/':8V'L $H'?'G $H;;z*33Loo T< ++ ..#.  s BB C-CCcj[U5upnUcUnU(a [XQX$5$[U0XU5$)uExecute a module's code without importing it. mod_name -- an absolute module name or package name. Optional arguments: init_globals -- dictionary used to pre-populate the module’s globals dictionary before the code is executed. run_name -- if not None, this will be used for setting __name__; otherwise, __name__ will be set to mod_name + '__main__' if the named module is a package and to just mod_name otherwise. alter_sys -- if True, sys.argv[0] is updated with the value of __file__ and sys.modules[__name__] is updated with a temporary module object for the module being executed. Both are restored to their original values before the function returns. Returns the resulting module globals dictionary. )rjrPrJ)r rErun_name alter_sysrFrCs rrrsA* 38<HHGGr<8DDrcDSn[RUn[RU [U5U[RU'$![a7nU[ U5;a"U"SU<S[R S<35UeeSnAff=f!U[RU'f=f)NrVz can't find z module in r)rrrjrZstrpath)rl main_name saved_mainr|s rrxrxs IY'J I,"9-", I  C (#((1+78=@ A  ", Is# A B2BBB BcbSSKJn [RR U5n[ R "U5nU"U5nSSS5 Wc<[ R "U5n[UR5US5nSSS5 U$U$!,(df  NO=f!,(df  U$=f)Nr) read_coderB) pkgutilrosrabspathio open_codecompileread)rIr code_pathfrCs r_get_code_from_filers!&I i A| ! | \\) $1668UF3D% K4K ! % $ Ks B&B B B.c tUcSnURS5SnSSKJn U"U5n[R"U5n[ U[ S55(a[U5n[XaUX0S9$[RRSU5 [5upxn[U5n [U5 U RR n [#XjUX(U5R%5sSSS5 sSSS5 [RR'U5 $![(a $f=f!,(df  O=fSSS5 O!,(df  O=f[RR'U5 g![(a gf=f![RR'U5 f![(a ff=f=f)uExecute code located at the specified filesystem location. path_name -- filesystem location of a Python script, zipfile, or directory containing a top level __main__.py script. Optional arguments: init_globals -- dictionary used to pre-populate the module’s globals dictionary before the code is executed. run_name -- if not None, this will be used to set __name__; otherwise, '' will be used for __name__. Returns the resulting module globals dictionary. Nz rRr) get_importer)rGrH)rXrrrfsdecode isinstancerhrrPrrinsertrxrr)r rLrJrMremoverf) path_namerErrGrimporterrCr rFrNrOs rrrst""3'*H$I&H I&I(DJ''#9-H)1J J 9% (@'A $HX&+ *)0099  L$,BBF$&+*'&   *  +**'&&   *    *  sF' E32D(% E. F8D D%$D%( D6 2E: F E FE55 FFF7F'&F7' F41F73F44F7rVz!No module specified for execution)file)NNNNN)T)NNF)NN)r%rimportlib.machineryraimportlib.utilrr__all__rhr r-rr)rJrPrZrj Exceptionrur~rrxrrr!lenr3printstderrr'rrrs  *  #Y  & . (V ( /3&*)-4)-,0/3 )4; zMYM+8'+(-E<$/,& 0f z 388}q 1 C HHQKCHHQK( r