ž ¦ÿf­(c@sdZddlZddlZddlZddlZddlmZmZm Z ddgZ Gdd„de ƒZ Gdd „d e ƒZ dddddd d „Zdddddd d „Zdd„Zdd„Zddd„Zddddd„Zdd„Zdd„Zdddd„Zedkr{eejƒdkr]eddejƒq{ejd=eejdƒndS( uZrunpy.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. iN(u read_codeu get_loaderu get_importeru run_moduleurun_pathcBs>|EeZdZdZdd„Zdd„Zdd„ZdS( u _TempModuleuCTemporarily replace a module in sys.modules with an empty namespacecCs(||_tj|ƒ|_g|_dS(N(umod_nameuimpu new_moduleumoduleu _saved_module(uselfumod_name((u*/opt/alt/python33/lib64/python3.3/runpy.pyu__init__s u_TempModule.__init__c CsM|j}y|jjtj|ƒWntk r8YnX|jtj|<|S(N(umod_nameu _saved_moduleuappendusysumodulesuKeyErrorumodule(uselfumod_name((u*/opt/alt/python33/lib64/python3.3/runpy.pyu __enter__s  u_TempModule.__enter__cGs=|jr#|jdtj|ju.iN(uNoneu rpartitionu get_importeru isinstanceutypeuimpu NullImporteru_get_code_from_fileu_run_module_codeusysupathuinsertu_get_main_module_detailsu _TempModuleu_ModifiedArgv0umoduleu__dict__u _run_codeucopyuremoveu ValueError( u path_nameu init_globalsurun_nameupkg_nameuimporterucodeu mod_loaderumod_nameuloaderufnameu temp_moduleu mod_globals((u*/opt/alt/python33/lib64/python3.3/runpy.pyurun_pathÔs(       & u__main__iu!No module specified for executionufileTF(u__doc__uosusysuimportlib.machineryu importlibuimpupkgutilu read_codeu get_loaderu get_importeru__all__uobjectu _TempModuleu_ModifiedArgv0uNoneu _run_codeu_run_module_codeu _get_filenameu_get_module_detailsuTrueu_run_module_as_mainuFalseu run_moduleu_get_main_module_detailsu_get_code_from_fileurun_pathu__name__ulenuargvuprintustderr(((u*/opt/alt/python33/lib64/python3.3/runpy.pyus6        &  ,