3 ^ c@s~ddlZddlZddlZddlZddlZddlZddlZdddgZGddde Z d ddZ d d dZ e d krzeje dS)NcompilemainPyCompileErrorc@seZdZdddZddZdS)rcCst|j}|tkr2djtj||}|jdd|}n d||f}tj||pJ||||||_||_ ||_ |pl||_ dS)NrzFile ""z File "%s"z Sorry: %s: %s) __name__Z SyntaxErrorZjoin tracebackZformat_exception_onlyZreplace Exception__init__ exc_type_name exc_valuefilemsg)selfZexc_typer r r r ZtbtextZerrmsgr"/usr/lib64/python3.6/py_compile.pyr-s  zPyCompileError.__init__cCs|jSN)r )r rrr__str__=szPyCompileError.__str__N)r)rZ __module__Z __qualname__rrrrrrrs FcCs|dkr>|dkr2|dkr|nd}tjj||d}n tjj|}tjj|r^d}t|j|n,tjj|rtjj | rd}t|j|tj j d|}|j |}y|j ||p||d} WnVtk r} z8t| j| |p|} |r| ntjj| jd dSWYdd} ~ XnXy tjj|} | r0tj| Wntk rHYnX|j|} tjj| | d | d }tjj|}tjj||||S) Nrrr) optimizationzc{} is a symlink and will be changed into a regular file if import writes a byte-compiled file to itzk{} is a non-regular file and will be changed into a regular one if import writes a byte-compiled file to itz )Z _optimize ZmtimeZsize) importlibZutilZcache_from_sourceosZpathZislinkZFileExistsErrorZformatZexistsZisfileZ machineryZSourceFileLoaderZget_dataZsource_to_coderrZ __class__sysstderrwriter dirnameZmakedirsZ path_statsZ_bootstrap_externalZ_code_to_bytecodeZ _calc_modeZ _write_atomic)r ZcfileZdfiledoraiseZoptimizerr ZloaderZ source_bytesZcodeZerrZpy_excrZ source_statsZbytecodeZmoderrrrAsF)         cCs"|dkrtjdd}d}|dgkrxtjj}|s6P|jd}yt|ddWq&tk r}zd}tjjd|j WYdd}~Xq&t k r}zd}tjjd|WYdd}~Xq&Xq&WnZxX|D]P}yt|ddWqtk r}zd}tjjd|j WYdd}~XqXqW|S)Nrrz-rT)rz%s ) rZargvZstdinZreadlineZrstriprrrrr ZOSError)ZargsZrvZfilenameZerrorrrrrs0    "( (Z__main__)NNFrr)Zimportlib._bootstrap_externalrZimportlib.machineryZimportlib.utilrZos.pathrrZ__all__rrrrrZexitrrrrZs 0 R &