*j3SrSSKrSSKrSSKrSSKrSSKrSS/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/alt/python313/lib64/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 *[U[5(aSU0O0nURS5(aU"S0UD6eURS5un nU(ae[ U5 [ RRU5nUb7[US5(d&SSK J n SRXS9nU"[U55 [RR!U5n U c U"SU-40UD6eU R.b5US:XdUR)S5(aU"S0UD6eUS-n [1X5$U R2n U c U"SU-40UD6eU R5U5n U c U"SU-40UD6eX U 4$![aLnUR b3UR U:wa$URUR S-5(deSnAGN[SnAff=f![["[$[&4aZn SnUR)S 5(aUS USS S US 3- nU"URU[+U 5R,U 540UD6U eSn A ff=f!Ua+nU[ R;aeU"U<SU<S340UD6eSnAff=f![anU"[U540UD6UeSnAff=f)Nname.__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; z- is a package and cannot be directly executedz0%r is a namespace package and cannot be executedzNo code object available for %s)z#Relative module names not supported)z%Cannot use package as __main__ module) issubclass ImportError startswith rpartition __import__rRrrgethasattrwarningsrUformatRuntimeWarning importlibutil find_specAttributeError TypeError ValueErrorendswithtyper!submodule_search_locations_get_module_detailsr>get_code)r errorkwargsrG_eexistingrUmsgspecex pkg_main_namer>rCs rrkrkis#-e[#A#Afh rF3DVDD((-NHa  x ;;??8,  *(E(E %#FHFH  $ % &~~''1 |(83>v>> &&2 z !X%6%6{%C%CJ6J J "${2M&}< <[[F ~FCKL 0x( |5@KFKK 4 m vv~!&&H"4 ++AFFSL99  & J ? &K   U # # mHSbM?3 z!68 9CCJJxb):):B?#% & &$ "s{{*9:HF" " " " 0F1I((a/0sb E,<GH<I0, G6AF==GH9AH44H9<I-&I((I-0 J:J  Jc\rSrSrSrSrg)_ErrorzBError that _run_module_as_main() should report without a tracebackr'N)r!r"r#r$r%r&r'rrrwrwsLrrwcU(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__ rWz: Nr) rkrw_get_main_module_detailsr executableexitrrLr?r3rJ)r alter_argvrFrCexcrr main_globalss r_run_module_as_mainrs 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. )rkrPrJ)r rErun_name alter_sysrFrCs rrrsA* 38<HHGGr<8DDrc|Sn[U[5(aSU0O0n[RUn[RU [ U5U[RU'$![a8nU[ U5;a#U"SU<S[R S<340UD6UeeSnAff=f!U[RU'f=f)NrWrRz can't find z module in r)rXrYrrrkstrpath)rm main_namern saved_mainr~s rrzrzs I$.uk$B$Bfi FY'J I ,"9-", I  C (#((1+7" "'* +  ", Is$ A!! B#+3BB##B&&B;cbSSKJn [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 rSr) get_importer)rGrH)r[rrrfsdecode isinstancerirrPrrinsertrzrr)r rLrJrMremoverg) path_namerErrGrimporterrCr rFrNrOs rrr st""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' F41F73F44F7rWz!No module specified for execution)file)NNNNN)T)NNF)NN)r%rimportlib.machineryrbimportlib.utilrr__all__rir r-rr)rJrPrYrk Exceptionrwrrrzrrr!lenr3printstderrr'rrrs  *  #Y  & . (V ( /3&*)-4)-,0/3 )4@ DMYM+8'+(-E<$/,* 0f z 388}q 1 C HHQKCHHQK( r