usr/lib64/python3.6/__pycache__/os.cpython-36.opt-2.pyc000064400000042565147204645330016310 0ustar003 \0@sddlZddlZddlZddlZejZdddddddd d d d d dddddddgZddZddZ dekrdZ dZ ddl Tyddl m Z ejdWnek rYnXddlZyddl mZWnek rYnXddl Z eje e [ ndekrdZ d Z ddlTyddlm Z ejdWnek r:YnXddlZddlZeje e[yddlmZWnek rYnXned!eejd"<dd#lmZmZmZmZmZmZmZmZ[ed$re Z!d%d&Z"e#Z$e"d'd(e"d)d*e"d+d,e"d-d.e"d/d0e"d1d2e"d3d4e"d5d6e"d7d8e"d9d:e"d;d<e"d=d>e"d?d@e"dAdBe"dAdCe"dDd0e$Z%e#Z$e"d'd(e$Z&e#Z$e"dEdFe"dGd*e"dHd,e"dIdJe"dKdLe$j'ee"dMdNe"dOd0e"dPd0e"dQdRedSr edTr e"dUdSe$Z(e#Z$e"d'd(e"d+d,e"d-d.e"dVdWe"dXd*edYrpe"dZd,e"d1d2e"d[d0e"d\d.e"d-d.e"dDd0e"d]d.e$Z)[$[[!["dZ*d^Z+d_Z,ddbdcZ-dddeZ.dfdgZ/ejdcdedggddidjZ0ejdje1ehe%krBe2ehe(krBddaddldmdnZ3dodpZ4ejdnye5Wne6k rdiZ5YnXdqdrZ7dsdtZ8dudvZ9dwdxZ:dydzZ;d{d|Zddl?m@Z@Gddde@ZAyeBZCWne6k rddZCYnXdekrejdyeDZEWne6k r>ddZEYnXdekrTejdddZFeFZ5[FdddZGe dkZHejdeHrddZIeAe5jJeIeKeIeKeCeEZL[IdddZMejdddZNeN\ZOZP[NedrDed rDedrDdZQd^ZRZSejdddgddZTddZUddZVddZWddZXejddddgedrlddZYddZZejddgedrddZ[ddZ\ejddgdddZ]GdddZ^ddZ_ddZ`edse`Zadea_bGdddejcZddS)NaltsepcurdirpardirseppathseplinesepdefpathnamepathdevnullSEEK_SETSEEK_CURSEEK_ENDfsencodefsdecode get_exec_pathfdopenpopenextsepcCs |tkS)N)globals)r r/usr/lib64/python3.6/os.py_exists%src Cs2y t|jStk r,ddt|DSXdS)NcSsg|]}|ddkr|qS)r_r).0nrrr ,sz%_get_exports_list..)list__all__AttributeErrordir)modulerrr_get_exports_list(s r"posix )*)_exitr&)_have_functionsntz zno os specific module foundzos.path)rrrrrrrr r'cCs"|tkr|tkrtjt|dS)N)_globalsr'_setadd)strfnrrr_adddsr.HAVE_FACCESSATaccess HAVE_FCHMODATchmod HAVE_FCHOWNATchown HAVE_FSTATATstatHAVE_FUTIMESATutime HAVE_LINKATlink HAVE_MKDIRATmkdir HAVE_MKFIFOATmkfifo HAVE_MKNODATmknod HAVE_OPENATopenHAVE_READLINKATreadlink HAVE_RENAMEATrenameHAVE_SYMLINKATsymlink HAVE_UNLINKATunlinkrmdirHAVE_UTIMENSAT HAVE_FCHDIRchdir HAVE_FCHMOD HAVE_FCHOWNHAVE_FDOPENDIRlistdir HAVE_FEXECVEexecveHAVE_FTRUNCATEtruncate HAVE_FUTIMENS HAVE_FUTIMESHAVE_FPATHCONFpathconfstatvfsfstatvfs HAVE_FSTATVFS HAVE_LCHFLAGSZchflags HAVE_LCHMODlchown HAVE_LCHOWN HAVE_LUTIMES HAVE_LSTATZ MS_WINDOWSFcCstj|\}}|s tj|\}}|r~|r~tj| r~yt|||Wntk rXYnXt}t|trrttd}||kr~dSyt||Wn(t k r| stj | rYnXdS)NASCII) r splitexistsmakedirsFileExistsErrorr isinstancebytesr<OSErrorisdir)r modeexist_okheadtailcdirrrrrjs$   rjc Cslt|tj|\}}|s(tj|\}}x>|rf|rfy t|Wntk rTPYnXtj|\}}q*WdS)N)rKr rhrn)r rrrsrrr removedirss   ruc Csptj|\}}|r*|r*tj| r*t|t||tj|\}}|rl|rly t|Wntk rjYnXdS)N)r rhrirjrFrurn)oldnewrrrsrrrrenamess  rxTc6cst|}g}g}g}y t|}Wn0tk rP}z|dk rB||dSd}~XnX|xy(y t|} Wntk rPYnXWn0tk r}z|dk r||dSd}~XnXy | j} Wntk rd} YnX| r|j| jn |j| j| r^| r^|rd} n.y | j} Wntk r8d} YnX| } | r^|j| j q^WWdQRX|r|||fVt j t j } }xp|D]6}|||}|s| | rt ||||EdHqWn0x"|D]}t ||||EdHqW|||fVdS)NFT) fspathscandirrnnext StopIterationis_dirappendr is_symlinkr islinkjoinwalk)toptopdownonerror followlinksdirsnondirs walk_dirs scandir_iterrorentryr} walk_intorrrdirnamenew_pathrrrrs`:             r.)follow_symlinksdir_fdc cst|t st|d r t|}t|d|d}t|t|d}z:|s^tj|j rtt j |t|rtt |||||EdHWdt |XdS)N __index__F)rr)r)rlinthasattrryr6rBO_RDONLYstS_ISDIRst_moder samestat_fwalkclose)rrrrrorig_sttopfdrrrfwalks!rc cs|t|}gg}}x|D]}y.tjt||djr>|j|n |j|Wqtk ry$tjt||ddjr||j|Wntk rwYnXYqXqW|r||||fVx|D]}y t|||d} t|t |d} Wn8tk r} z|dk r|| wWYdd} ~ XnXz>|s0t j | t| rRt j ||} t | | |||EdHWdt| XqW|sx||||fVdS)N)rF)rr)rRrrr6rr~rnS_ISLNKrBrr rrrr) rtoppathrrrnamesrrr rdirfderrdirpathrrrrs<      rcGst||dS)N)execv)fileargsrrrexecl srcGs |d}t||dd|dS)Nrdr)rT)rrenvrrrexeclesrcGst||dS)N)execvp)rrrrrexeclpsrcGs |d}t||dd|dS)Nrdrr)execvpe)rrrrrrexeclpe srcCst||dS)N)_execvpe)rrrrrr)srcCst|||dS)N)r)rrrrrrr1srcCs|dk rt}||f}nt}|f}t}tj|\}}|rH||f|dSd}}d} t|} tdkrvt|}tt| } x| D]~} tj | |} y|| f|Wq|t k r} z>| }t j d}| j t jkr| j t jkr|dkr| }|} WYdd} ~ Xq|Xq|W|r|j| |j|dS)Nr(re)rTrenvironr rhrr rmaprrnsysexc_infoerrnoENOENTENOTDIRwith_traceback)rrr exec_funcargrestrrrslast_exc saved_excsaved_tb path_listr fullnameetbrrrr<s<      rcCsddl}|dkrt}|j|jdty|jd}Wntk rPd}YnXtry |d}Wnttfk rzYnX|dk rt d|}|dk rt |t rt |}WdQRX|dkrt }|jtS)NrignorePATHsPATHz*env cannot contain 'PATH' and b'PATH' keys)warningsrcatch_warnings simplefilter BytesWarningget TypeErrorsupports_bytes_environKeyError ValueErrorrlrmrrrhr)rrr path_listbrrrr_s.     )MutableMappingc@sTeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ dS)_EnvironcCs.||_||_||_||_||_||_||_dS)N) encodekey decodekey encodevalue decodevalueputenvunsetenv_data)selfdatarrrrrrrrr__init__sz_Environ.__init__c Cs>y|j|j|}Wntk r2t|dYnX|j|S)N)rrrr)rkeyvaluerrr __getitem__s z_Environ.__getitem__cCs.|j|}|j|}|j||||j|<dS)N)rrrr)rrrrrr __setitem__s   z_Environ.__setitem__c CsD|j|}|j|y |j|=Wntk r>t|dYnXdS)N)rrrr)rr encodedkeyrrr __delitem__s    z_Environ.__delitem__ccs(t|j}x|D]}|j|VqWdS)N)rrr)rkeysrrrr__iter__s  z_Environ.__iter__cCs t|jS)N)lenr)rrrr__len__sz_Environ.__len__cs$djdjfddjjDS)Nzenviron({{{}}})z, c3s*|]"\}}djj|j|VqdS)z {!r}: {!r}N)formatrr)rrr)rrr sz$_Environ.__repr__..)rrritems)rr)rr__repr__s z_Environ.__repr__cCst|S)N)dict)rrrrcopysz _Environ.copycCs||kr|||<||S)Nr)rrrrrr setdefaultsz_Environ.setdefaultN) __name__ __module__ __qualname__rrrrrrrrrrrrrrs  rcCsdS)Nr)rrrrrsrrcCs t|dS)N)_putenv)rrrrrsrcstdkrLdd}|t}fdd}i}xJtjD]\}}||||<q2Wn(tjfddfdd }}t}t||||ttS) Nr(cSs t|tstdt|j|S)Nzstr expected, not %s)rlr,rtyper)rrrr check_strs z!_createenviron..check_strcs |jS)N)upper)r)encoderrrsz!_createenviron..encodekeycs(t|tstdt|j|jdS)Nzstr expected, not %ssurrogateescape)rlr,rrrr)r)encodingrrrs z_createenviron..encodecs |jdS)Nr)decode)r)rrrrsz_createenviron..decode) r r,rrrgetfilesystemencodingrr _unsetenv)rrrrrrr)rrr_createenvirons"   rcCs tj||S)N)rr)rdefaultrrrgetenvsrrcCs t|tstdt|j|S)Nzbytes expected, not %s)rlrmrrr)rrrr _check_bytess rcCs tj||S)N)environbr)rrrrrgetenvbsrrcs4tjtjfdd}fdd}||fS)Ncs&t|}t|tr|jS|SdS)N)ryrlr,r)filename)rerrorsrrrs  z_fscodec..fsencodecs&t|}t|tr|jS|SdS)N)ryrlrmr)r)rrrrr&s  z_fscodec..fsdecode)rrgetfilesystemencodeerrors)rrr)rrr_fscodecs   rforkspawnvrP_WAITP_NOWAIT P_NOWAITOc Cst|ttfstd| s&|d r.tdt}|sty$|dkrN|||n ||||WqtdYqXnV|tkr|SxHt|d\}}t |rqqt |rt | St |rt |StdqWdS)Nzargv must be a tuple or a listrz"argv first element cannot be emptyz"Not stopped, signaled or exited???)rltuplerrrrr&rwaitpid WIFSTOPPED WIFSIGNALEDWTERMSIG WIFEXITED WEXITSTATUSrn)rprrrfuncpidwpidstsrrr _spawnvefCs.  rcCst|||dtS)N)rr)rprrrrrrbscCst||||tS)N)rrT)rprrrrrrspawnveksrcCst|||dtS)N)rr)rprrrrrspawnvpwsrcCst||||tS)N)rr)rprrrrrrspawnvpesrcGs t|||S)N)r)rprrrrrspawnlsrcGs|d}t|||dd|S)Nrdrr)r)rprrrrrrspawnlesrcGs t|||S)N)r)rprrrrrspawnlpsrcGs|d}t|||dd|S)Nrdrr)r)rprrrrrrspawnlpesrrcCst|tstdt||d kr.td||dks>|dkrFtdddl}ddl}|dkr|j|d|j|d}t |j |j |S|j|d|j|d }t |j |j |SdS) Nz&invalid cmd type (%s, expected string)rwzinvalid mode %rrz+popen() does not support unbuffered streamsT)shellstdoutbufsize)r stdinr")rr) rlr,rrr subprocessioPopenPIPE _wrap_close TextIOWrapperr!r#)cmdrp bufferingr$r%procrrrrs$  c@s<eZdZddZddZddZddZd d Zd d Zd S)r(cCs||_||_dS)N)_stream_proc)rstreamr,rrrrsz_wrap_close.__init__cCs8|jj|jj}|dkr dStdkr,|S|d>SdS)Nrr()r-rr.waitr )r returncoderrrrs  z_wrap_close.closecCs|S)Nr)rrrr __enter__sz_wrap_close.__enter__cGs |jdS)N)r)rrrrr__exit__sz_wrap_close.__exit__cCs t|j|S)N)getattrr-)rr rrr __getattr__sz_wrap_close.__getattr__cCs t|jS)N)iterr-)rrrrrsz_wrap_close.__iter__N) rrrrrr3r4r6rrrrrr(s  r(cOs4t|tstdt|ddl}|j|f||S)Nz&invalid fd type (%s, expected integer)r)rlrrrr%rB)fdrkwargsr%rrrrs c Cst|ttfr|St|}y|j|}Wn0tk rXt|drFntd|jYnXt|ttfrl|Stdj |jt|jdS)N __fspath__z/expected str, bytes or os.PathLike object, not z7expected {}.__fspath__() to return str or bytes, not {}) rlr,rmrr:rrrrr)r path_type path_reprrrr_fspaths r=ryc@s&eZdZejddZeddZdS)PathLikecCstdS)N)NotImplementedError)rrrrr:&szPathLike.__fspath__cCs t|dS)Nr:)r)clssubclassrrr__subclasshook__+szPathLike.__subclasshook__N)rrrabcabstractmethodr: classmethodrBrrrrr>"sr>)rfF)TNF)rTN)N)N)N)rr)N)rrr)rr)erCrrr6rbuiltin_module_namesZ_namesrrr"r rr#r&r~ ImportError posixpathr r'extendr(ZntpathmodulesZos.pathrrrrrrrr rr)r.setr*supports_dir_fdsupports_effective_idsr+ supports_fdsupports_follow_symlinksr r rrjrurxrrBrRrrr NameErrorrrrrrrrr_collections_abcrrrrrrrrrrrrmrrrrrrrr rrrrrrrrrrr(rr=ryrABCr>rrrrsz       (                                             ./     # - 7