mò %U²Ic@s•dZdkZdkZdkZddgZdddddd„Zddddd„Zd „Ze d jo!e eƒ ƒZ ei e ƒndS( síModule/script to "compile" all .py files to .pyc (or .pyo) file. When called as a script with arguments, this compiles the directories given as arguments recursively; the -l option prevents it from recursing into directories. Without arguments, if compiles all modules on sys.path, without recursing into subdirectories. (Even though it should do so for packages -- for now, you'll have to deal with packages separately.) See module py_compile for details of the actual byte-compilation. Nt compile_dirt compile_pathi icCsè|pdG|GdGHnyti|ƒ}Wn%tij odG|GHg}nX|iƒd}x~|D]v}ti i ||ƒ}|d j oti i ||ƒ} nd } |d j o!|i|ƒ}|oqjqßnti i|ƒol|d |d}} | djoF|todpd} ti|ƒi} yti| ƒi}Wntij o d }nX|| jo| oqjn|pd G|GdGHnyti|d | tƒ}Wnyt j o t ‚qZti!j o/}|od G|GdGHn|i#GHd }qZt$j o} d G| GHd }qZX|d jo d }qZqàqj|d jou|ti'joe|ti(joUti i)|ƒoBti i*|ƒ o.t+||d| |||ƒp d }qàqjqjW|S( sÁByte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that will show up in error messages) force: if 1, force compilation, even if timestamps are up-to-date quiet: if 1, be quiet during compilation tListings...s Can't listiiýÿÿÿs.pytctoit CompilingtSorryN(,tquiettdirtostlistdirtnamesterrortsorttsuccesstnametpathtjointfullnametddirtNonetdfiletrxtsearchtmotisfiletheadttailt __debug__tcfiletstattst_mtimetftimetctimetforcet py_compiletcompiletTruetoktKeyboardInterrupttPyCompileErrorterrtmsgtIOErrortet maxlevelstcurdirtpardirtisdirtislinkR(RR-RR"RRR)RR RR RRR,RR&R!RRR((t'/data/zmath/lib/python2.4/compileall.pyRsf              T icCshd}x[tiD]P}| p|tijo|o dGHq|ot||d|d|ƒ}qW|S(sByte-compile all module on sys.path. Arguments (all optional): skip_curdir: if true, skip current directory (default true) maxlevels: max recursion level (default 0) force: as for compile_dir() (default 0) quiet: as for compile_dir() (default 0) isSkipping current directoryRN( RtsysRRR R.t skip_curdirRR-RR"R(R4R-R"RRR((R2RWs   cCsédk} y#| itiddƒ\} }WnR| ij oC} | GHdGHdGHdGHdGHdGHd GHd GHd GHtid ƒnXd }d}d}d}d}x™| D]‘\}}|djo d}n|djo |}n|djo d}n|djo d}n|djodk}|i|ƒ}q¦q¦W|o-t|ƒdjodGHtid ƒqond} yO|o;xA|D],} t| |||||ƒp d} q†q†Wn tƒ} Wntj odGHd} nX| S(sScript main program.Nislfqd:x:sSusage: python compileall.py [-l] [-f] [-q] [-d destdir] [-x regexp] [directory ...]s-l: don't recurse downs3-f: force rebuild even if timestamps are up-to-dates-q: quiet operations7-d destdir: purported directory name for error messagess4 if no directory arguments, -l sys.path is assumeds<-x regexp: skip files matching the regular expression regexps8 the regexp is search for in the full path of the fileii is-ls-ds-fs-qs-xs1-d destdir require exactly one directory arguments [interrupt](tgetoptR3targvtoptstargsR R*texitR-RRR"RRRtatreR$tlenRRRRR'(R:R"RR-R8RRRR;RRR*R5R7((R2tmainksd #          t__main__( t__doc__R R3R#t__all__RRRR=t__name__tintt exit_statusR9(RCR@RR#RR3R=R ((R2t? s    B 0