/opt/alt/python34/lib64/python3.4/__pycache__
NameSizeModeActions
abc.cpython-34.pyc78770644editdlrm
abc.cpython-34.pyo78270644editdlrm
aifc.cpython-34.pyc279120644editdlrm
aifc.cpython-34.pyo279120644editdlrm
antigravity.cpython-34.pyc8470644editdlrm
antigravity.cpython-34.pyo8470644editdlrm
argparse.cpython-34.pyc658740644editdlrm
argparse.cpython-34.pyo657150644editdlrm
ast.cpython-34.pyc123600644editdlrm
ast.cpython-34.pyo123600644editdlrm
asynchat.cpython-34.pyc83590644editdlrm
asynchat.cpython-34.pyo83590644editdlrm
asyncore.cpython-34.pyc179630644editdlrm
asyncore.cpython-34.pyo179630644editdlrm
base64.cpython-34.pyc182970644editdlrm
base64.cpython-34.pyo180990644editdlrm
bdb.cpython-34.pyc186940644editdlrm
bdb.cpython-34.pyo186940644editdlrm
binhex.cpython-34.pyc135410644editdlrm
binhex.cpython-34.pyo135410644editdlrm
bisect.cpython-34.pyc28580644editdlrm
bisect.cpython-34.pyo28580644editdlrm
bz2.cpython-34.pyc151560644editdlrm
bz2.cpython-34.pyo151560644editdlrm
calendar.cpython-34.pyc275670644editdlrm
calendar.cpython-34.pyo275670644editdlrm
cgi.cpython-34.pyc298270644editdlrm
cgi.cpython-34.pyo298270644editdlrm
cgitb.cpython-34.pyc110640644editdlrm
cgitb.cpython-34.pyo110640644editdlrm
chunk.cpython-34.pyc52700644editdlrm
chunk.cpython-34.pyo52700644editdlrm
cmd.cpython-34.pyc134560644editdlrm
cmd.cpython-34.pyo134560644editdlrm
code.cpython-34.pyc97020644editdlrm
code.cpython-34.pyo97020644editdlrm
codecs.cpython-34.pyc351320644editdlrm
codecs.cpython-34.pyo351320644editdlrm
codeop.cpython-34.pyc64660644editdlrm
codeop.cpython-34.pyo64660644editdlrm
colorsys.cpython-34.pyc36590644editdlrm
colorsys.cpython-34.pyo36590644editdlrm
compileall.cpython-34.pyc73780644editdlrm
compileall.cpython-34.pyo73780644editdlrm
configparser.cpython-34.pyc448820644editdlrm
configparser.cpython-34.pyo448820644editdlrm
contextlib.cpython-34.pyc103700644editdlrm
contextlib.cpython-34.pyo103700644editdlrm
copy.cpython-34.pyc80610644editdlrm
copy.cpython-34.pyo79750644editdlrm
copyreg.cpython-34.pyc46070644editdlrm
copyreg.cpython-34.pyo45660644editdlrm
cProfile.cpython-34.pyc46220644editdlrm
cProfile.cpython-34.pyo46220644editdlrm
crypt.cpython-34.pyc24370644editdlrm
crypt.cpython-34.pyo24370644editdlrm
csv.cpython-34.pyc129970644editdlrm
csv.cpython-34.pyo129970644editdlrm
datetime.cpython-34.pyc562640644editdlrm
datetime.cpython-34.pyo542960644editdlrm
decimal.cpython-34.pyc1725260644editdlrm
decimal.cpython-34.pyo1725260644editdlrm
difflib.cpython-34.pyc605150644editdlrm
difflib.cpython-34.pyo604670644editdlrm
dis.cpython-34.pyc145870644editdlrm
dis.cpython-34.pyo145870644editdlrm
doctest.cpython-34.pyc801100644editdlrm
doctest.cpython-34.pyo798370644editdlrm
dummy_threading.cpython-34.pyc12140644editdlrm
dummy_threading.cpython-34.pyo12140644editdlrm
enum.cpython-34.pyc163390644editdlrm
enum.cpython-34.pyo163390644editdlrm
filecmp.cpython-34.pyc91200644editdlrm
filecmp.cpython-34.pyo91200644editdlrm
fileinput.cpython-34.pyc142970644editdlrm
fileinput.cpython-34.pyo142970644editdlrm
fnmatch.cpython-34.pyc31460644editdlrm
fnmatch.cpython-34.pyo31460644editdlrm
formatter.cpython-34.pyc189160644editdlrm
formatter.cpython-34.pyo189160644editdlrm
fractions.cpython-34.pyc192700644editdlrm
fractions.cpython-34.pyo192700644editdlrm
ftplib.cpython-34.pyc333220644editdlrm
ftplib.cpython-34.pyo333220644editdlrm
functools.cpython-34.pyc236140644editdlrm
functools.cpython-34.pyo236140644editdlrm
genericpath.cpython-34.pyc34930644editdlrm
genericpath.cpython-34.pyo34930644editdlrm
getopt.cpython-34.pyc67330644editdlrm
getopt.cpython-34.pyo66910644editdlrm
getpass.cpython-34.pyc46240644editdlrm
getpass.cpython-34.pyo46240644editdlrm
gettext.cpython-34.pyc151740644editdlrm
gettext.cpython-34.pyo151740644editdlrm
glob.cpython-34.pyc28800644editdlrm
glob.cpython-34.pyo28800644editdlrm
gzip.cpython-34.pyc194460644editdlrm
gzip.cpython-34.pyo193920644editdlrm
hashlib.cpython-34.pyc79440644editdlrm
hashlib.cpython-34.pyo79440644editdlrm
heapq.cpython-34.pyc139100644editdlrm
heapq.cpython-34.pyo139100644editdlrm
hmac.cpython-34.pyc51460644editdlrm
hmac.cpython-34.pyo51460644editdlrm
imaplib.cpython-34.pyc434790644editdlrm
imaplib.cpython-34.pyo409550644editdlrm
imghdr.cpython-34.pyc41430644editdlrm
imghdr.cpython-34.pyo41430644editdlrm
imp.cpython-34.pyc98670644editdlrm
imp.cpython-34.pyo98670644editdlrm
inspect.cpython-34.pyc763270644editdlrm
inspect.cpython-34.pyo760060644editdlrm
io.cpython-34.pyc34580644editdlrm
io.cpython-34.pyo34580644editdlrm
ipaddress.cpython-34.pyc629840644editdlrm
ipaddress.cpython-34.pyo629840644editdlrm
keyword.cpython-34.pyc19460644editdlrm
keyword.cpython-34.pyo19460644editdlrm
linecache.cpython-34.pyc31120644editdlrm
linecache.cpython-34.pyo31120644editdlrm
locale.cpython-34.pyc372760644editdlrm
locale.cpython-34.pyo372760644editdlrm
lzma.cpython-34.pyc159170644editdlrm
lzma.cpython-34.pyo159170644editdlrm
macpath.cpython-34.pyc60060644editdlrm
macpath.cpython-34.pyo60060644editdlrm
macurl2path.cpython-34.pyc21020644editdlrm
macurl2path.cpython-34.pyo21020644editdlrm
mailbox.cpython-34.pyc702880644editdlrm
mailbox.cpython-34.pyo701890644editdlrm
mailcap.cpython-34.pyc65440644editdlrm
mailcap.cpython-34.pyo65440644editdlrm
mimetypes.cpython-34.pyc168070644editdlrm
mimetypes.cpython-34.pyo168070644editdlrm
modulefinder.cpython-34.pyc173760644editdlrm
modulefinder.cpython-34.pyo172970644editdlrm
netrc.cpython-34.pyc42770644editdlrm
netrc.cpython-34.pyo42770644editdlrm
nntplib.cpython-34.pyc363100644editdlrm
nntplib.cpython-34.pyo363100644editdlrm
ntpath.cpython-34.pyc133050644editdlrm
ntpath.cpython-34.pyo133050644editdlrm
nturl2path.cpython-34.pyc17160644editdlrm
nturl2path.cpython-34.pyo17160644editdlrm
numbers.cpython-34.pyc126670644editdlrm
numbers.cpython-34.pyo126670644editdlrm
opcode.cpython-34.pyc51740644editdlrm
opcode.cpython-34.pyo51740644editdlrm
operator.cpython-34.pyc127780644editdlrm
operator.cpython-34.pyo127780644editdlrm
optparse.cpython-34.pyc515370644editdlrm
optparse.cpython-34.pyo514600644editdlrm
os.cpython-34.pyc295990644editdlrm
os.cpython-34.pyo295990644editdlrm
pathlib.cpython-34.pyc404830644editdlrm
pathlib.cpython-34.pyo404830644editdlrm
pdb.cpython-34.pyc494720644editdlrm
pdb.cpython-34.pyo494060644editdlrm
pickle.cpython-34.pyc469840644editdlrm
pickle.cpython-34.pyo468380644editdlrm
pickletools.cpython-34.pyc702540644editdlrm
pickletools.cpython-34.pyo691670644editdlrm
pipes.cpython-34.pyc84310644editdlrm
pipes.cpython-34.pyo84310644editdlrm
pkgutil.cpython-34.pyc176000644editdlrm
pkgutil.cpython-34.pyo176000644editdlrm
platform.cpython-34.pyc311720644editdlrm
platform.cpython-34.pyo311720644editdlrm
plistlib.cpython-34.pyc301510644editdlrm
plistlib.cpython-34.pyo300680644editdlrm
poplib.cpython-34.pyc137540644editdlrm
poplib.cpython-34.pyo137540644editdlrm
posixpath.cpython-34.pyc98090644editdlrm
posixpath.cpython-34.pyo98090644editdlrm
pprint.cpython-34.pyc114600644editdlrm
pprint.cpython-34.pyo112950644editdlrm
profile.cpython-34.pyc151510644editdlrm
profile.cpython-34.pyo148980644editdlrm
pstats.cpython-34.pyc236750644editdlrm
pstats.cpython-34.pyo236750644editdlrm
pty.cpython-34.pyc42250644editdlrm
pty.cpython-34.pyo42250644editdlrm
pyclbr.cpython-34.pyc91920644editdlrm
pyclbr.cpython-34.pyo91920644editdlrm
pydoc.cpython-34.pyc909150644editdlrm
pydoc.cpython-34.pyo908540644editdlrm
py_compile.cpython-34.pyc68570644editdlrm
py_compile.cpython-34.pyo68570644editdlrm
queue.cpython-34.pyc92620644editdlrm
queue.cpython-34.pyo92620644editdlrm
quopri.cpython-34.pyc64460644editdlrm
quopri.cpython-34.pyo62360644editdlrm
random.cpython-34.pyc190590644editdlrm
random.cpython-34.pyo190590644editdlrm
re.cpython-34.pyc145500644editdlrm
re.cpython-34.pyo145500644editdlrm
reprlib.cpython-34.pyc58720644editdlrm
reprlib.cpython-34.pyo58720644editdlrm
rlcompleter.cpython-34.pyc56950644editdlrm
rlcompleter.cpython-34.pyo56950644editdlrm
runpy.cpython-34.pyc77530644editdlrm
runpy.cpython-34.pyo77530644editdlrm
sched.cpython-34.pyc65730644editdlrm
sched.cpython-34.pyo65730644editdlrm
selectors.cpython-34.pyc167440644editdlrm
selectors.cpython-34.pyo167440644editdlrm
shelve.cpython-34.pyc99550644editdlrm
shelve.cpython-34.pyo99550644editdlrm
shlex.cpython-34.pyc75180644editdlrm
shlex.cpython-34.pyo75180644editdlrm
shutil.cpython-34.pyc330150644editdlrm
shutil.cpython-34.pyo330150644editdlrm
site.cpython-34.pyc179710644editdlrm
site.cpython-34.pyo179710644editdlrm
smtpd.cpython-34.pyc256690644editdlrm
smtpd.cpython-34.pyo256690644editdlrm
smtplib.cpython-34.pyc331290644editdlrm
smtplib.cpython-34.pyo330550644editdlrm
sndhdr.cpython-34.pyc67690644editdlrm
sndhdr.cpython-34.pyo67690644editdlrm
socket.cpython-34.pyc181110644editdlrm
socket.cpython-34.pyo180610644editdlrm
socketserver.cpython-34.pyc232550644editdlrm
socketserver.cpython-34.pyo232550644editdlrm
sre_compile.cpython-34.pyc119350644editdlrm
sre_compile.cpython-34.pyo117780644editdlrm
sre_constants.cpython-34.pyc55810644editdlrm
sre_constants.cpython-34.pyo55810644editdlrm
sre_parse.cpython-34.pyc202380644editdlrm
sre_parse.cpython-34.pyo202380644editdlrm
ssl.cpython-34.pyc276080644editdlrm
ssl.cpython-34.pyo276080644editdlrm
stat.cpython-34.pyc35780644editdlrm
stat.cpython-34.pyo35780644editdlrm
statistics.cpython-34.pyc171580644editdlrm
statistics.cpython-34.pyo168560644editdlrm
string.cpython-34.pyc83760644editdlrm
string.cpython-34.pyo83760644editdlrm
stringprep.cpython-34.pyc136360644editdlrm
stringprep.cpython-34.pyo135730644editdlrm
struct.cpython-34.pyc3470644editdlrm
struct.cpython-34.pyo3470644editdlrm
subprocess.cpython-34.pyc433590644editdlrm
subprocess.cpython-34.pyo432460644editdlrm
sunau.cpython-34.pyc183090644editdlrm
sunau.cpython-34.pyo183090644editdlrm
symbol.cpython-34.pyc26620644editdlrm
symbol.cpython-34.pyo26620644editdlrm
symtable.cpython-34.pyc113050644editdlrm
symtable.cpython-34.pyo111830644editdlrm
sysconfig.cpython-34.pyc172870644editdlrm
sysconfig.cpython-34.pyo172870644editdlrm
tabnanny.cpython-34.pyc77490644editdlrm
tabnanny.cpython-34.pyo77490644editdlrm
tarfile.cpython-34.pyc680400644editdlrm
tarfile.cpython-34.pyo680400644editdlrm
telnetlib.cpython-34.pyc193940644editdlrm
telnetlib.cpython-34.pyo193940644editdlrm
tempfile.cpython-34.pyc215760644editdlrm
tempfile.cpython-34.pyo215760644editdlrm
textwrap.cpython-34.pyc138000644editdlrm
textwrap.cpython-34.pyo137140644editdlrm
this.cpython-34.pyc13160644editdlrm
this.cpython-34.pyo13160644editdlrm
threading.cpython-34.pyc389650644editdlrm
threading.cpython-34.pyo382520644editdlrm
timeit.cpython-34.pyc110620644editdlrm
timeit.cpython-34.pyo110620644editdlrm
token.cpython-34.pyc36150644editdlrm
token.cpython-34.pyo36150644editdlrm
tokenize.cpython-34.pyc199510644editdlrm
tokenize.cpython-34.pyo199010644editdlrm
trace.cpython-34.pyc241840644editdlrm
trace.cpython-34.pyo241270644editdlrm
traceback.cpython-34.pyc110910644editdlrm
traceback.cpython-34.pyo110910644editdlrm
tracemalloc.cpython-34.pyc171300644editdlrm
tracemalloc.cpython-34.pyo171300644editdlrm
tty.cpython-34.pyc11460644editdlrm
tty.cpython-34.pyo11460644editdlrm
types.cpython-34.pyc55600644editdlrm
types.cpython-34.pyo55600644editdlrm
uu.cpython-34.pyc40210644editdlrm
uu.cpython-34.pyo40210644editdlrm
uuid.cpython-34.pyc218640644editdlrm
uuid.cpython-34.pyo218020644editdlrm
warnings.cpython-34.pyc122680644editdlrm
warnings.cpython-34.pyo115360644editdlrm
wave.cpython-34.pyc191350644editdlrm
wave.cpython-34.pyo190740644editdlrm
weakref.cpython-34.pyc203450644editdlrm
weakref.cpython-34.pyo203080644editdlrm
webbrowser.cpython-34.pyc171320644editdlrm
webbrowser.cpython-34.pyo170930644editdlrm
xdrlib.cpython-34.pyc90020644editdlrm
xdrlib.cpython-34.pyo90020644editdlrm
zipfile.cpython-34.pyc458200644editdlrm
zipfile.cpython-34.pyo457710644editdlrm
_bootlocale.cpython-34.pyc10470644editdlrm
_bootlocale.cpython-34.pyo10160644editdlrm
_collections_abc.cpython-34.pyc239490644editdlrm
_collections_abc.cpython-34.pyo239490644editdlrm
_compat_pickle.cpython-34.pyc75010644editdlrm
_compat_pickle.cpython-34.pyo74270644editdlrm
_dummy_thread.cpython-34.pyc48250644editdlrm
_dummy_thread.cpython-34.pyo48250644editdlrm
_markupbase.cpython-34.pyc89320644editdlrm
_markupbase.cpython-34.pyo87450644editdlrm
_osx_support.cpython-34.pyc106300644editdlrm
_osx_support.cpython-34.pyo106300644editdlrm
_pyio.cpython-34.pyc649330644editdlrm
_pyio.cpython-34.pyo649070644editdlrm
_sitebuiltins.cpython-34.pyc36770644editdlrm
_sitebuiltins.cpython-34.pyo36770644editdlrm
_strptime.cpython-34.pyc157790644editdlrm
_strptime.cpython-34.pyo157790644editdlrm
_sysconfigdata.cpython-34.pyc227000644editdlrm
_sysconfigdata.cpython-34.pyo227000644editdlrm
_threading_local.cpython-34.pyc69460644editdlrm
_threading_local.cpython-34.pyo69460644editdlrm
_weakrefset.cpython-34.pyc84650644editdlrm
_weakrefset.cpython-34.pyo84650644editdlrm
__future__.cpython-34.pyc41680644editdlrm
__future__.cpython-34.pyo41680644editdlrm
__phello__.foo.cpython-34.pyc1340644editdlrm
__phello__.foo.cpython-34.pyo1340644editdlrm
Edit: /opt/alt/python34/lib64/python3.4/__pycache__/shutil.cpython-34.pyc (33015B)
fޛ1@sdZddlZddlZddlZddlmZddlZddlZddlZddl Z yddl Z [ dZ Wne k rdZ YnXyddl mZWne k rdZYnXyddlmZWne k rdZYnXdd d d d d ddddddddddddddddddd gZGd!ddeZGd"d d eZGd#ddeZGd$ddeZGd%d&d&eZGd'd(d(eZd}d+dZd,d-Zd.dd/d Zd.dd0d Zeed1r4d.dd2d3Zn d4d3Zd.dd5d Z d.dd6d Z!d.dd7d Z"d8dZ#dde"dd9dZ$d:d;Z%d<d=Z&ej'ejej(ej)hej*koej+ej,koejej-kZ.ddd>dZ/e.e/_0d?d@Z1dAdZ2dBdCZ3dDdEZ4dFdGZ5dHddddddIdJZ6dddKdLZ7ddddMdNZ8ie6d~gdPfdQ6e6dgdRfdS6e8gdTfdU6Z9e re6dgdWfe9dXd_d`Z?ddZdadZ@dbdZAdcddZBdedfZCdgdhZDididjgeDgdPfdQ6dkgeDgdRfdS6dlgeCgdTfdU6ZEe rdmgeDgdWfeEdX._nopcstt|S)N)getattrr-)rL)rRr!r"lookupszcopystat..lookupcs)tt|}|tjkr%|SS)N)rSr-supports_follow_symlinks)rLr?)rRr!r"rTsr8utimerBst_flagsZchflags EOPNOTSUPPrG)rXzENOTSUP)r-r.r;r8rDr: st_atime_ns st_mtime_nsNotImplementedErrorr,rWr/rFrSrN) r1r2r4ZfollowrTr@modewhyerrr!)rRr"rs,+!   'cCs`tjj|r6tjj|tjj|}nt||d|t||d||S)a3Copy data and mode bits ("cp src dst"). Return the file's destination. The destination may be a directory. If follow_symlinks is false, symlinks won't be followed. This resembles GNU's "cp -P src dst". If source and destination are the same file, a SameFileError will be raised. r4)r-r.isdirjoinbasenamerr)r1r2r4r!r!r"r s $cCs`tjj|r6tjj|tjj|}nt||d|t||d||S)zCopy data and all stat info ("cp -p src dst"). Return the file's destination." The destination may be a directory. If follow_symlinks is false, symlinks won't be followed. This resembles GNU's "cp -P src dst". r4)r-r.r_r`rarr)r1r2r4r!r!r"r s $csfdd}|S)zFunction that can be used as copytree() ignore parameter. Patterns is a sequence of glob-style patterns that are used to exclude filescs:g}x'D]}|jtj||q Wt|S)N)extendfnmatchfilterset)r.rJ ignored_namespattern)patternsr!r"_ignore_patternss z)ignore_patterns.._ignore_patternsr!)rhrir!)rhr"rscCstj|}|dk r-|||}n t}tj|g}x|D]} | |krhqPntjj|| } tjj|| } ytjj| r=tj| } |rtj| | t | | d| qutjj |  r|rwPntjj | r-t | | |||qu|| | n8tjj | rht | | |||n || | WqPt k r} z|j| jdWYdd} ~ XqPtk r}z!|j| | t|fWYdd}~XqPXqPWyt ||Wn\tk re}z<t|dddkrS|j||t|fnWYdd}~XnX|r{t |n|S)aRecursively copy a directory tree. The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the destination tree; if it is false, the contents of the files pointed to by symbolic links are copied. If the file pointed by the symlink doesn't exist, an exception will be added in the list of errors raised in an Error exception at the end of the copy process. You can set the optional ignore_dangling_symlinks flag to true if you want to silence this exception. Notice that this has no effect on platforms that don't support os.symlink. The optional ignore argument is a callable. If given, it is called with the `src` parameter, which is the directory being visited by copytree(), and `names` which is the list of `src` contents, as returned by os.listdir(): callable(src, names) -> ignored_names Since copytree() is called recursively, the callable will be called once for each directory that is copied. It returns a list of names relative to the `src` directory that should not be copied. The optional copy_function argument is a callable that will be used to copy each file. It will be called with the source path and the destination path as arguments. By default, copy2() is used, but any function that supports the same signature (like copy()) can be used. Nr4rZwinerror)r-listdirremakedirsr.r`r;r=r<rexistsr_r rrbrOr/appendstrrS)r1r2symlinksignoreZ copy_functionZignore_dangling_symlinksrJrferrorsrLZsrcnameZdstnamelinktor^r]r!r!r"r sL$      &32c$Csy%tjj|r$tdnWn2tk rY|tjj|tjdSYnXg}ytj|}Wn+tk r|tj|tjYnXx|D]}tjj||}ytj|j }Wntk rd}YnXt j |rt ||qytj |Wqtk rQ|tj |tjYqXqWytj|Wn+tk r|tj|tjYnXdS)Nz%Cannot call rmtree on a symbolic linkr)r-r.r;r/sysexc_inforjr`rCr:r8S_ISDIR_rmtree_unsafeunlinkrmdir)r.onerrorrJrLfullnamer\r!r!r"rv_s6       " rvc 0Cs@g}ytj|}WnGtk rb}z'||_|tj|tjWYdd}~XnXx|D]}tjj||}y(tj|d|dd}|j }Wntk rd}YnXtj |rytj |tj d|} Wn+tk r#|tj |tjYq8Xztjj |tj| rt| ||ytj|d|Wqtk r|tj|tjYqXnAytdWn.tk r|tjj|tjYnXWdtj| Xqjytj|d|Wqjtk r7|tj|tjYqjXqjWdS)Ndir_fdr4Frz%Cannot call rmtree on a symbolic link)r-rjr/filenamersrtr.r`r8r:rur>O_RDONLYsamestatfstat_rmtree_safe_fdrxr;closerw) topfdr.ryrJr^rLrzorig_str\dirfdr!r!r"rsD ,      ! % rc!Cs|rdd}n|dkr0dd}ntrt|trWtj|}nytj|}Wn/tk r|tj|tjdSYnXytj |tj }Wn/tk r|tj|tjdSYnXztj j |tj |rZt|||ytj|Wqtk rV|tj|tjYqXnAytdWn.tk r|tj j|tjYnXWdtj|Xn t||SdS)aRecursively delete a directory tree. If ignore_errors is set, errors are ignored; otherwise, if onerror is set, it is called to handle the error with arguments (func, path, exc_info) where func is platform and implementation dependent; path is the argument to that function that caused it to fail; and exc_info is a tuple returned by sys.exc_info(). If ignore_errors is false and onerror is None, an exception is raised. cWsdS)Nr!)rOr!r!r"ryszrmtree..onerrorNcWsdS)Nr!)rOr!r!r"rysz%Cannot call rmtree on a symbolic link)_use_fd_functions isinstancebytesr-fsdecoderC Exceptionrsrtr>r}r.r~rrrxr/r;rrv)r. ignore_errorsryrfdr!r!r"r s<       ! %cCs5tjjtjjpd}tjj|j|S)N)r-r.sepaltseprarstrip)r.rr!r!r" _basenamesrc Cs`|}tjj|r~t||r;tj||dStjj|t|}tjj|r~td|q~nytj||Wnt k r[tjj |rtj |}tj ||tj |nttjj|r=t||rtd||fnt||ddt|nt||tj |YnX|S)a0Recursively move a file or directory to another location. This is similar to the Unix "mv" command. Return the file or directory's destination. If the destination is a directory or a symlink to a directory, the source is moved inside the directory. The destination path must not already exist. If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics. If the destination is on our current filesystem, then rename() is used. Otherwise, src is copied to the destination and then removed. Symlinks are recreated under the new name if os.rename() fails because of cross filesystem renames. A lot more could be done here... A look at a mv.c shows a lot of the issues this implementation glosses over. Nz$Destination path '%s' already existsz.Cannot move a directory '%s' into itself '%s'.roT)r-r.r_r3renamer`rrlrr/r;r=r<rw _destinsrcr r r )r1r2Zreal_dstrrr!r!r"r s.   cCsut|}t|}|jtjjs@|tjj7}n|jtjjsh|tjj7}n|j|S)N)rendswithr-r.r startswith)r1r2r!r!r"rs  rc Cs_tdks|dkrdSyt|}Wntk rFd}YnX|dk r[|dSdS)z"Returns a gid, given a group name.N)rKeyError)rLresultr!r!r"_get_gid(s   rc Cs_tdks|dkrdSyt|}Wntk rFd}YnX|dk r[|dSdS)z"Returns an uid, given a user name.Nr)rr)rLrr!r!r"_get_uid4s   rgzipc sidd6dd6}idd6} tr>d|d._set_uid_gidzw|%srd)_BZ2_SUPPORTED ValueErrorr7getr-r.dirnamerlinforkrrtarfiler>addr) base_namebase_dircompressverbosedry_runrrloggerZtar_compressionZ compress_extZ archive_name archive_dirrtarr!)rrrrr" _make_tarball@s4         rc Cs~|rd}nd}ddlm}ddlm}y |d|||gd|Wn"|k rytd|YnXdS) Nz-rz-rqr)DistutilsExecError)spawnziprzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utility)Zdistutils.errorsrZdistutils.spawnrr)r zip_filenamerrZ zipoptionsrrr!r!r"_call_external_zip~s    rcCsN|d}tjj|}|rmtjj| rm|dk rT|jd|n|smtj|qmnyddl}Wntk rd}YnX|dkrt||||n|dk r|jd||n|sJ|j |dd|j H}tjj |} |j | | |dk rA|jd| nxtj |D]\} } } xdt| D]V} tjj tjj| | } |j | | |dk rm|jd| qmqmWxs| D]k} tjj tjj| | } tjj| r|j | | |dk r9|jd| q9qqWqQWWdQXn|S) amCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises ExecError. Returns the name of the output zip file. z.zipNz creating %srz#creating '%s' and adding '%s' to itwZ compressionz adding '%s')r-r.rrlrrkzipfile ImportErrorrZipFileZ ZIP_DEFLATEDnormpathr(walksortedr`isfile)rrrrrrrrZzfr.dirpathZdirnames filenamesrLr!r!r" _make_zipfilesH         !  ! 'rrzgzip'ed tar-fileZgztarzuncompressed tar filerzZIP filerrzbzip2'ed tar-fileZbztarcCs'ddtjD}|j|S)zReturns a list of supported formats for archiving and unarchiving. Each element of the returned sequence is a tuple (name, description) cSs&g|]\}}||dfqS)rr!).0rLregistryr!r!r" s z'get_archive_formats..)_ARCHIVE_FORMATSitemssort)formatsr!r!r"rs  rcCs|dkrg}nt|s4td|nt|ttfsXtdnxE|D]=}t|ttf st|dkr_tdq_q_W|||ft|.)_UNPACK_FORMATSrr)rr!r!r"r(s  c Csi}x9tjD]+\}}x|dD]}|||r(r) r| extract_dirrrrrLtargetdatafr!r!r"_unpack_zipfilees0    rcCs^ytj|}Wn%tjk r:td|YnXz|j|Wd|jXdS)z:Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir` z/%s is not a compressed or uncompressed tar fileN)rr>ZTarErrorr$Z extractallr)r|rZtarobjr!r!r"_unpack_tarfilesrz.tar.gzz.tgzz.tarz.zipz.bz2cCsIxBtjD]4\}}x%|dD]}|j|r$|Sq$Wq WdS)Nr)rrr)r|rLrrr!r!r"_find_unpack_formats  rcCs|dkrtj}n|dk ryt|}Wn'tk r^tdj|YnX|d}|||t|dnbt|}|dkrtdj|nt|d}tt|d}||||dS)aUnpack an archive. `filename` is the name of the archive. `extract_dir` is the name of the target directory, where the archive is unpacked. If not provided, the current working directory is used. `format` is the archive format: one of "zip", "tar", or "gztar". Or any other registered format. If not provided, unpack_archive will use the filename extension and see if an unpacker was registered for that extension. In case none is found, a ValueError is raised. NzUnknown unpack format '{0}'rrzUnknown archive format '{0}') r-rrrrr7dictrr$)r|rr7rrrPr!r!r"rs      statvfs disk_usageZusageztotal used freecCsVtj|}|j|j}|j|j}|j|j|j}t|||S)zReturn disk usage statistics about the given path. Returned value is a named tuple with attributes 'total', 'used' and 'free', which are the amount of total, used and free space, in bytes. )r-rf_bavailf_frsizef_blocksf_bfree_ntuple_diskusage)r.r@freetotalusedr!r!r"rs ntcCs/tj|\}}||}t|||S)zReturn disk usage statistics about the given path. Returned values is a named tuple with attributes 'total', 'used' and 'free', which are the amount of total, used and free space, in bytes. )rZ _getdiskusager)r.rrrr!r!r"rs cCs|dkr'|dkr'tdn|}|}|dkrHd}nBt|trt|}|dkrtdj|qn|dkrd}nBt|tst|}|dkrtdj|qntj |||dS)zChange owner user and group of the given path. user and group can be the uid/gid or the user/group names, and in that case, they are converted to their respective uid/gid. Nzuser and/or group must be setrzno such user: {!r}zno such group: {!r}r) rrrnr LookupErrorr7intrr-r)r.userrZ_userZ_groupr!r!r"rs"        PcCsyttjd}Wnttfk r7d}YnXyttjd}Wnttfk rod}YnX|dks|dkrytjtjj}Wn't t fk rtj |}YnX|dkr|j }n|dkr|j }qntj ||fS)aGet the size of the terminal window. For each of the two dimensions, the environment variable, COLUMNS and LINES respectively, is checked. If the variable is defined and the value is a positive integer, it is used. When COLUMNS or LINES is not defined, which is the common case, the terminal connected to sys.__stdout__ is queried by invoking os.get_terminal_size. If the terminal size cannot be successfully queried, either because the system doesn't support querying, or because we are not connected to a terminal, the value given in fallback parameter is used. Fallback defaults to (80, 24) which is the default size used by many terminal emulators. The value returned is a named tuple of type os.terminal_size. ZCOLUMNSrZLINES)rr-environrrrrs __stdout__fileno NameErrorr/ terminal_sizecolumnslines)Zfallbackrrsizer!r!r"rs$     c sdd}tjjr5||r1SdS|dkr\tjjdtj}n|sfdS|jtj}tj dkrtj |kr|j dtj ntjjddjtj}t fd d |Drg}qfd d |D}n g}t }xu|D]m}tjj|}||kr-|j|x9|D].} tjj|| } || |re| SqeWq-q-WdS) a3Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result of os.environ.get("PATH"), or can be overridden with a custom search path. cSs5tjj|o4tj||o4tjj| S)N)r-r.rlaccessr_)r?r\r!r!r" _access_checkFs$zwhich.._access_checkNPATHwin32rZPATHEXTrc3s*|] }jj|jVqdS)N)lowerr)rr)cmdr!r" cszwhich..csg|]}|qSr!r!)rr)r r!r"rfs zwhich..)r-r.rrrdefpathrpathseprsplatformrinsertanyrer0rr`) r r\r.rZpathextfilesseendirZnormdirZthefilerLr!)r r"r9s8  !       i@)compresszgzip)rN)rzbzip2)rr)Sr#r-rsr8Zos.pathrrc collectionsrFrrrrpwdrZgrpr__all__r/rrrrr$rr%rr3rrr,rNrr r rr rvrr>rwrxsupports_dir_fdrj supports_fdrUrr Zavoids_symlink_attacksrr rrrrrrrrrrrrrrrrrrrrrrm namedtuplerrrLrrrF_OKX_OKrr!r!r!r"s                    6 Y ! , 5   1 =6    6    %   %     +