ACC SHELL

Path : /usr/lib/python/
File Upload :
Current File : //usr/lib/python/os.pyo

oMc@sHdZddkZddkZeiZddddddd	d
ddd
dddgZdZdejordZdZddk	Tyddk	l
Z
Wnej
onXddkZ
ddk	Z	eiee	[	n?dejordZdZddkTyddkl
Z
Wnej
onXddkZ
ddkZeiee[ndejodZdZddkTyddkl
Z
Wnej
onXeiiddjoddkZ
nddkZ
ddklZddkZeiee[ndejordZdZddkTyddkl
Z
Wnej
onXddkZ
ddkZeiee[ndejordZdZddkTyddkl
Z
Wnej
onXddkZ
ddkZeiee[n
ede
eid<ddklZlZlZlZl Z l!Z!l"Z"l#Z#[d Z$d!Z%d"Z&d#d$Z'd%Z(d&Z)eid'd(d)ge*de,d*Z-ei.d+ye/Wne0j
o
hZ/nXd,Z1d-Z2d.Z3d/Z4d0Z5d1Z6eid2d3d4d5d6d7gdd8Z7ye8Wne0j
onXddk9Z9edajo
d9Z:nedjodd:k;l<Z<nDedbjod;e9i=fd<YZ<nd;e9i=fd=YZ<e<e/Z/dd>Z>ei.d?d@Z?e?dAo\e?dBoNe?dCoAd Z@d!ZAZBdDZCdEZDdFZEdGZFdHZGne?dBo/dIZHdJZIeidBdKdLdMgne?dNo/dOZJdPZKeidNdQdRdSgne?dAoe?dTp dUddVZLei.dTne?dWp dUddXZMei.dWne?dYp dUddZZNei.dYqnddkOZPd[ZQd\ZRyePiSeTeReQWne0j
onXd]ZUd^ZVyePiSeWeVeUWne0j
onXe?d_p
d`ZXndS(csOS routines for Mac, NT, or Posix depending on what system we're on.

This exports:
  - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
  - os.path is one of the modules posixpath, or ntpath
  - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos'
  - os.curdir is a string representing the current directory ('.' or ':')
  - os.pardir is a string representing the parent directory ('..' or '::')
  - os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
  - os.extsep is the extension separator ('.' or '/')
  - os.altsep is the alternate pathname separator (None or '/')
  - os.pathsep is the component separator used in $PATH etc
  - os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
  - os.defpath is the default search path for executables
  - os.devnull is the file path of the null device ('/dev/null', etc.)

Programs that import and use 'os' stand a better chance of being
portable between different platforms.  Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
iNtaltseptcurdirtpardirtseptextseptpathseptlineseptdefpathtnametpathtdevnulltSEEK_SETtSEEK_CURtSEEK_ENDcCsbyt|iSWnJtj
o>g}t|D]"}|ddjo||q3q3~SXdS(Nit_(tlistt__all__tAttributeErrortdir(tmodulet_[1]tn((s/usr/lib/python2.6/os.pyt_get_exports_list#stposixs
(t*(t_exittnts
tos2sEMX GCC(tlinktcetriscossno os specific module foundsos.path(RRRRRRRR
iiiicCsti|\}}|pti|\}}n|oq|ojti|oYyt||Wn/tj
o#}|itijoqnX|tjodSnt||dS(smakedirs(path [, mode=0777])

    Super-mkdir; create a leaf directory and all intermediate ones.
    Works like mkdir, except that any intermediate path segment (not
    just the rightmost) will be created if it does not exist.  This is
    recursive.

    N(	R	tsplittexiststmakedirstOSErrorterrnotEEXISTRtmkdir(Rtmodetheadttailte((s/usr/lib/python2.6/os.pyR!s	
	cCst|ti|\}}|pti|\}}nxM|oE|o>yt|Wntj
oPnXti|\}}qBWdS(sremovedirs(path)

    Super-rmdir; remove a leaf directory and all empty intermediate
    ones.  Works like rmdir except that, if the leaf directory is
    successfully removed, directories corresponding to rightmost path
    segments will be pruned away until either the whole path is
    consumed or an error occurs.  Errors during this latter phase are
    ignored -- they generally mean that a directory was not empty.

    N(trmdirR	Rterror(RR'R(((s/usr/lib/python2.6/os.pyt
removedirss
cCsti|\}}|o&|oti|ot|nt||ti|\}}|o/|o(yt|Wqtj
oqXndS(s@renames(old, new)

    Super-rename; create directories as necessary and delete any left
    empty.  Works like rename, except creation of any intermediate
    directories needed to make the new pathname good is attempted
    first.  After the rename, directories corresponding to rightmost
    path segments of the old name will be pruned way until either the
    whole path is consumed or a nonempty directory is found.

    Note: this function can fail with the new directory structure made
    if you lack permissions needed to unlink the leaf directory or
    file.

    N(R	RR R!trenameR,R+(toldtnewR'R(((s/usr/lib/python2.6/os.pytrenamess
R!R,R0ccsFddkl}l}l}yt|}Wn1tj
o%}|dj	o||ndSXgg}	}
xB|D]:}||||o|	i|qt|
i|qtW|o||	|
fVnx[|	D]S}|||}|p||o)x&t||||D]}
|
VqWqqW|p||	|
fVndS(s<
Directory tree generator.

    For each directory in the directory tree rooted at top (including top
    itself, but excluding '.' and '..'), yields a 3-tuple

        dirpath, dirnames, filenames

    dirpath is a string, the path to the directory.  dirnames is a list of
    the names of the subdirectories in dirpath (excluding '.' and '..').
    filenames is a list of the names of the non-directory files in dirpath.
    Note that the names in the lists are just names, with no path components.
    To get a full path (which begins with top) to a file or directory in
    dirpath, do os.path.join(dirpath, name).

    If optional arg 'topdown' is true or not specified, the triple for a
    directory is generated before the triples for any of its subdirectories
    (directories are generated top down).  If topdown is false, the triple
    for a directory is generated after the triples for all of its
    subdirectories (directories are generated bottom up).

    When topdown is true, the caller can modify the dirnames list in-place
    (e.g., via del or slice assignment), and walk will only recurse into the
    subdirectories whose names remain in dirnames; this can be used to prune
    the search, or to impose a specific order of visiting.  Modifying
    dirnames when topdown is false is ineffective, since the directories in
    dirnames have already been generated by the time dirnames itself is
    generated.

    By default errors from the os.listdir() call are ignored.  If
    optional arg 'onerror' is specified, it should be a function; it
    will be called with one argument, an os.error instance.  It can
    report the error to continue with the walk, or raise the exception
    to abort the walk.  Note that the filename is available as the
    filename attribute of the exception object.

    By default, os.walk does not follow symbolic links to subdirectories on
    systems that support them.  In order to get this functionality, set the
    optional argument 'followlinks' to true.

    Caution:  if you pass a relative pathname for top, don't change the
    current working directory between resumptions of walk.  walk never
    changes the current directory, and assumes that the client doesn't
    either.

    Example:

    import os
    from os.path import join, getsize
    for root, dirs, files in os.walk('python/Lib/email'):
        print root, "consumes",
        print sum([getsize(join(root, name)) for name in files]),
        print "bytes in", len(files), "non-directory files"
        if 'CVS' in dirs:
            dirs.remove('CVS')  # don't visit CVS directories
    i(tjointisdirtislinkN(	tos.pathR1R2R3tlistdirR+tNonetappendtwalk(ttopttopdowntonerrortfollowlinksR1R2R3tnamesterrtdirstnondirsRR	tx((s/usr/lib/python2.6/os.pyR8s09

R8cGst||dS(spexecl(file, *args)

    Execute the executable file with argument list args, replacing the
    current process. N(texecv(tfiletargs((s/usr/lib/python2.6/os.pytexecl3scGs"|d}t||d |dS(sexecle(file, *args, env)

    Execute the executable file with argument list args and
    environment env, replacing the current process. iN(texecve(RCRDtenv((s/usr/lib/python2.6/os.pytexecle:s
cGst||dS(sexeclp(file, *args)

    Execute the executable file (which is searched for along $PATH)
    with argument list args, replacing the current process. N(texecvp(RCRD((s/usr/lib/python2.6/os.pytexeclpBscGs"|d}t||d |dS(sexeclpe(file, *args, env)

    Execute the executable file (which is searched for along $PATH)
    with argument list args and environment env, replacing the current
    process. iN(texecvpe(RCRDRG((s/usr/lib/python2.6/os.pytexeclpeIs
cCst||dS(sexecvp(file, args)

    Execute the executable file (which is searched for along $PATH)
    with argument list args, replacing the current process.
    args may be a list or tuple of strings. N(t_execvpe(RCRD((s/usr/lib/python2.6/os.pyRIRscCst|||dS(sexecvpe(file, args, env)

    Execute the executable file (which is searched for along $PATH)
    with argument list args and environment env , replacing the
    current process.
    args may be a list or tuple of strings. N(RM(RCRDRG((s/usr/lib/python2.6/os.pyRKZsRERHRJRLRIRKcCsh|dj	ot}||f}nt}|f}t}ti|\}}|o|||dSd|jo|d}nt}|it}d}	d}
x|D]}ti||}y|||Wqt	j
o\}
t
id}|
iti
jo0|
itijo|	djo|
}	|}
q=qXqW|	ot	|	|
nt	|
|dS(NtPATHi(R6RFRBtenvironR	RRRR1R+tsystexc_infoR#tENOENTtENOTDIR(RCRDRGtfunctargrestR'R(tenvpathRNt	saved_exctsaved_tbRtfullnameR)ttb((s/usr/lib/python2.6/os.pyRMes<
	

&
cCst|ddS(Nt(tputenv(tkey((s/usr/lib/python2.6/os.pytunsetenvs(t_EnvironR_cBseZdZdZdZyeWnej
odZnXdZdZdZ	dZ
dZdd	Z
dd
ZdZRS(
cCsJtii||i}x*|iD]\}}|||i<q&WdS(N(tUserDictt__init__tdatatitemstupper(tselfRORbtktv((s/usr/lib/python2.6/os.pyRas
	
cCs$t||||i|i<dS(N(R\RbRd(ReR]titem((s/usr/lib/python2.6/os.pyt__setitem__s
cCs|i|iS(N(RbRd(ReR]((s/usr/lib/python2.6/os.pyt__getitem__scCs|i|i=dS(N(RbRd(ReR]((s/usr/lib/python2.6/os.pyt__delitem__scCst||i|i=dS(N(R^RbRd(ReR]((s/usr/lib/python2.6/os.pyRks
cCs2x+|iiD]}t||i|=qWdS(N(RbtkeysR^(ReR]((s/usr/lib/python2.6/os.pytclears
cGs#t||ii|i|S(N(R^RbtpopRd(ReR]RD((s/usr/lib/python2.6/os.pyRns
cCs|i|ijS(N(RdRb(ReR]((s/usr/lib/python2.6/os.pythas_keyscCs|i|ijS(N(RdRb(ReR]((s/usr/lib/python2.6/os.pyt__contains__scCs|ii|i|S(N(RbtgetRd(ReR]tfailobj((s/usr/lib/python2.6/os.pyRqscKs|ojy|i}Wn4tj
o(xB|D]\}}|||<q/WqqXx |D]}||||<qUWn|o|i|ndS(N(RlRtupdate(RetdicttkwargsRlRfRg((s/usr/lib/python2.6/os.pyRsscCs
t|S(N(Rt(Re((s/usr/lib/python2.6/os.pytcopysN(t__name__t
__module__RaRiRjR^t	NameErrorRkRmRnRoRpR6RqRsRv(((s/usr/lib/python2.6/os.pyR_s								cBsheZdZdZddZyeWnej
onXdZdZ	dZ
dZRS(cCstii|||_dS(N(R`RaRb(ReRO((s/usr/lib/python2.6/os.pyRascCst||||i|<dS(N(R\Rb(ReR]Rh((s/usr/lib/python2.6/os.pyRis
cKs|ojy|i}Wn4tj
o(xB|D]\}}|||<q/WqqXx |D]}||||<qUWn|o|i|ndS(N(RlRRs(ReRtRuRlRfRg((s/usr/lib/python2.6/os.pyRsscCst||i|=dS(N(R^Rb(ReR]((s/usr/lib/python2.6/os.pyRks
cCs2x+|iiD]}t||i|=qWdS(N(RbRlR^(ReR]((s/usr/lib/python2.6/os.pyRms
cGst||ii||S(N(R^RbRn(ReR]RD((s/usr/lib/python2.6/os.pyRns
cCs
t|S(N(Rt(Re((s/usr/lib/python2.6/os.pyRvsN(RwRxRaRiR6RsR^RyRkRmRnRv(((s/usr/lib/python2.6/os.pyR_s					cCsti||S(sGet an environment variable, return None if it doesn't exist.
    The optional second argument can specify an alternate default.(RORq(R]tdefault((s/usr/lib/python2.6/os.pytgetenvsR{cCs-yt|tSWntj
otSXdS(N(tevaltTrueRytFalse(R((s/usr/lib/python2.6/os.pyt_existss

tforktspawnvRBcCst}|pJy2|djo|||n||||WqtdqXn||tjo|Sxft|d\}}t|oqoqot|ot|St|ot	|St
dqodS(Niis"Not stopped, signaled or exited???(RR6RtP_NOWAITtwaitpidt
WIFSTOPPEDtWIFSIGNALEDtWTERMSIGt	WIFEXITEDtWEXITSTATUSR+(R&RCRDRGRTtpidtwpidtsts((s/usr/lib/python2.6/os.pyt	_spawnvefs&	




cCst|||dtS(sspawnv(mode, file, args) -> integer

Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. N(RR6RB(R&RCRD((s/usr/lib/python2.6/os.pyR0scCst||||tS(s:spawnve(mode, file, args, env) -> integer

Execute file with arguments from args in a subprocess with the
specified environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. (RRF(R&RCRDRG((s/usr/lib/python2.6/os.pytspawnve9scCst|||dtS(s8spawnvp(mode, file, args) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. N(RR6RI(R&RCRD((s/usr/lib/python2.6/os.pytspawnvpEscCst||||tS(s\spawnvpe(mode, file, args, env) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess with the supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. (RRK(R&RCRDRG((s/usr/lib/python2.6/os.pytspawnvpeOscGst|||S(sspawnl(mode, file, *args) -> integer

Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. (R(R&RCRD((s/usr/lib/python2.6/os.pytspawnl]scGs!|d}t|||d |S(s:spawnle(mode, file, *args, env) -> integer

Execute file with arguments from args in a subprocess with the
supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. i(R(R&RCRDRG((s/usr/lib/python2.6/os.pytspawnlefs
RRRRcGst|||S(sWspawnlp(mode, file, *args) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess with the supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. (R(R&RCRD((s/usr/lib/python2.6/os.pytspawnlpxscGs!|d}t|||d |S(s]spawnlpe(mode, file, *args, env) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess with the supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. i(R(R&RCRDRG((s/usr/lib/python2.6/os.pytspawnlpes
RRRtpopen2ttcCsddk}d}|i|tddddk}|i}|i|dt|td|d|d	|d
t}|i	|i
fS(sExecute the shell command 'cmd' in a sub-process.  On UNIX, 'cmd'
            may be a sequence, in which case arguments will be passed directly to
            the program without shell intervention (as with os.spawnv()).  If 'cmd'
            is a string it will be passed to the shell (as with os.system()). If
            'bufsize' is specified, it sets the buffer size for the I/O pipes.  The
            file objects (child_stdin, child_stdout) are returned.iNs4os.popen2 is deprecated.  Use the subprocess module.t
stacklevelitshelltbufsizetstdintstdoutt	close_fds(twarningstwarntDeprecationWarningt
subprocesstPIPEtPopent
isinstancet
basestringR}RR(tcmdR&RRtmsgRRtp((s/usr/lib/python2.6/os.pyRs		tpopen3cCsddk}d}|i|tddddk}|i}|i|dt|td|d|d	|d
|dt}|i	|i
|ifS(sExecute the shell command 'cmd' in a sub-process.  On UNIX, 'cmd'
            may be a sequence, in which case arguments will be passed directly to
            the program without shell intervention (as with os.spawnv()).  If 'cmd'
            is a string it will be passed to the shell (as with os.system()). If
            'bufsize' is specified, it sets the buffer size for the I/O pipes.  The
            file objects (child_stdin, child_stdout, child_stderr) are returned.iNs4os.popen3 is deprecated.  Use the subprocess module.RiRRRRtstderrR(RRRRRRRRR}RRR(RR&RRRRRR((s/usr/lib/python2.6/os.pyRs	tpopen4cCsddk}d}|i|tddddk}|i}|i|dt|td|d|d	|d
|idt	}|i
|ifS(sExecute the shell command 'cmd' in a sub-process.  On UNIX, 'cmd'
            may be a sequence, in which case arguments will be passed directly to
            the program without shell intervention (as with os.spawnv()).  If 'cmd'
            is a string it will be passed to the shell (as with os.system()). If
            'bufsize' is specified, it sets the buffer size for the I/O pipes.  The
            file objects (child_stdin, child_stdout_stderr) are returned.iNs4os.popen4 is deprecated.  Use the subprocess module.RiRRRRRR(RRRRRRRRtSTDOUTR}RR(RR&RRRRRR((s/usr/lib/python2.6/os.pyRs	cCs
t||S(N(tstat_result(ttupRt((s/usr/lib/python2.6/os.pyt_make_stat_resultscCs|i\}}t|fS(N(t
__reduce__R(tsrttypeRD((s/usr/lib/python2.6/os.pyt_pickle_stat_resultscCs
t||S(N(tstatvfs_result(RRt((s/usr/lib/python2.6/os.pyt_make_statvfs_resultscCs|i\}}t|fS(N(RR(RRRD((s/usr/lib/python2.6/os.pyt_pickle_statvfs_resultsturandomcCsytdt}Wn%ttfj
otdnXzFd}x9|t|djo!|t||t|7}qGWWdt|X|S(sfurandom(n) -> str

        Return a string of n random bytes suitable for cryptographic use.

        s/dev/urandoms&/dev/urandom (or equivalent) not foundR[iN(topentO_RDONLYR"tIOErrortNotImplementedErrortlentreadtclose(Rt
_urandomfdtbs((s/usr/lib/python2.6/os.pyRs&(sos2snt(sos2snt(Yt__doc__RPR#tbuiltin_module_namest_namesRRRRRRtImportErrort	posixpathR	textendRtntpathRtversiontfindt
os2emxpatht	_emx_linkRRRt
riscospathtmodulesR4RRRRRRRR
RRR
R!R,R0R}R6R~R8R7RORyRERHRJRLRIRKRMR\R`R^t
riscosenvironR_tIterableUserDictR{RtP_WAITRt	P_NOWAITORRRRRRRRRRRRtcopy_regt	_copy_regRRtpickleRRRRR(((s/usr/lib/python2.6/os.pyt<module>s0		









	
:		Z
								#



5*
	(
					


			
	
	



				


ACC SHELL 2018