/usr/lib64/python2.6/site-packages/mx/Misc
NameSizeModeActions
Cache.py67380644editdlrm
Cache.pyc64820644editdlrm
Cache.pyo64820644editdlrm
CommandLine.py187060644editdlrm
CommandLine.pyc183610644editdlrm
CommandLine.pyo183610644editdlrm
ConfigFile.py295410644editdlrm
ConfigFile.pyc330040644editdlrm
ConfigFile.pyo330040644editdlrm
Cookie.py56250644editdlrm
Cookie.pyc57070644editdlrm
Cookie.pyo57070644editdlrm
COPYRIGHT10300644editdlrm
CSV.py185200644editdlrm
CSV.pyc181440644editdlrm
CSV.pyo181440644editdlrm
ExitFunctions.py23080644editdlrm
ExitFunctions.pyc28600644editdlrm
ExitFunctions.pyo28600644editdlrm
FileLock.py124190644editdlrm
FileLock.pyc120250644editdlrm
FileLock.pyo120250644editdlrm
LazyModule.py44000644editdlrm
LazyModule.pyc42440644editdlrm
LazyModule.pyo42440644editdlrm
LICENSE45870644editdlrm
Namespace.py154550644editdlrm
Namespace.pyc180510644editdlrm
Namespace.pyo180510644editdlrm
OrderedMapping.py131070644editdlrm
OrderedMapping.pyc150530644editdlrm
OrderedMapping.pyo150530644editdlrm
PackageTools.py116810644editdlrm
PackageTools.pyc113460644editdlrm
PackageTools.pyo113460644editdlrm
__init__.py00644editdlrm
__init__.pyc1410644editdlrm
__init__.pyo1410644editdlrm
Edit: /usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyo (18361B)
Ñò ½Hc @sˆdZdZdZddkZddkZddkZddkZddkZddkZddk Z ddk Z d„Z dd„Z de d „Zd „Zd „Ze Zeid ƒZeid ƒZeieed„Zeiieiieiieid„Zdfd„ƒYZdefd„ƒYZdefd„ƒYZdfd„ƒYZ e Z!d„Z"e#djo e"ƒndS(s  CommandLine - Get and parse command line options NOTE: This still is very much work in progress !!! Different version are likely to be incompatible. TODO: * Incorporate the changes made by (see Inbox) * Add number range option using srange() sòCopyright (c), 1997-2000, IKDS Marc-Andre Lemburg (mal@lemburg.com) Copyright (c), 2000-2007, eGenix.com Software GmbH (info@egenix.com) See the documentation for further information on copyrights, or contact the author. All Rights Reserved. s1.2iÿÿÿÿNcCs¤g}g}x|D]w}|idjo/|i|iƒ|io|idƒqŠq|io|i|idƒq|i|iƒqWti|dƒ|fS(sP Convert the option list to a getopt flag string and long opt list t-t:t=t(tprefixtappendtnamettakes_argumenttstringtjoin(toptionststlto((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyt _getopt_flagss  s>>> cCs6ddk}|i|ƒ}|djo t‚n|S(sw Get raw input from a terminal without echoing the characters to the terminal, e.g. for password queries. iÿÿÿÿN(tgetpasstNonetKeyboardInterrupt(tpromptRtentry((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pytinvisible_input1s    twbcCs©|djotiS|djotiS|djotiS|dj o%ddk}|i|||ƒ}nt||ƒ}d|joti|dƒn|SdS(s Open a file using mode. Default mode is 'wb' meaning to open the file for writing in binary mode. If encoding is given, I/O to and from the file is transparently encoded using the given encoding. Files opened for writing are chmod()ed to 0600. tstdouttstderrtstdiniÿÿÿÿNtwi€( tsysRRRRtcodecstopentostchmod(RtmodetencodingRtf((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pytfileopen=s      cCs(h}x|D]}|||i((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyt__init__´scCs·|}|i|i}|io|d}nt|ƒ|ijo*|dd|idt|iƒ}nd|i|f}|i}|io|d|i}nd||fS(Ns args t is%-*s s (%s)s%s %s(RRRR/ttabR>t has_defaulttdefault(R?R Rt description((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyt__str__ºs *  cCs|i|iS(N(RR(R?((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pytget_optionstringÉsN( t__name__t __module__t__doc__RRDthelptextRRRCRBR@RFRG(((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR=¨s  tArgumentOptioncBseZdZddd„ZRS(sY Option that takes an argument. An optional default argument can be given. cCsCti|||ƒ|dj o||_d|_nd|_dS(Ni(R=R@RRDRCR(R?RR>RD((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR@Ôs    N(RHRIRJRR@(((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyRLÍst SwitchOptioncBseZdZddd„ZRS(sD Options that can be on or off. Has an optional default value. cCs:ti|||ƒ|dj o||_d|_ndS(Ni(R=R@RRDRC(R?RR>RD((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR@ãs  N(RHRIRJRR@(((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyRMÞst Applicationc BseZdZgZeddƒeddƒeddƒeddƒeddƒed d ƒed d ƒgZd Zd ZdZd Z d Z d Z e Z dZdZdZeiZd%Zd%Zd%Zd%Zd%d„Zd„Zd„Zd„Zdd„Zd„Zd„Zd d„Z d„Z!d„Z"d„Z#d„Z$d%d„Z%d%d„Z&d%d„Z'd%d „Z(d%d!„Z)d%d"„Z*d%d#„Z+d$„Z,RS(&sP Command line application interface with builtin argument parsing. s-vsgenerate verbose outputs --verboses-hsshow this help texts--helps--debugsenable debuggings --copyrightsshow copyrights --examplessshow examples of usageRs%(name)s [option] files...iic CsC|djo ti}ntii|dƒd|_|ip tii|iƒd|_n |i|_|ip|i|_n |i|_|d|_ t |i ƒ|_ x8|i D]-}|i i|iƒp|i|ƒq¼q¼Wg|_zys|iƒ}|dj o t|‚n|iƒ}|dj o t|‚n|iƒ}|djo d}nWnœtj o }n‰tj oHdGHHd}nj|ij oZHdGH|ip |ioHtidtiƒnHdtiƒd GHHdGHHd}nXWd|i|ƒ}|dj o |}nXt|‚dS( Niis * User Breaks* Internal Error:is %s: %sis$ (use --debug to see the traceback)(RRtargvRR8R0tfilenameRtheadert argumentsR%R t optionmaptpreset_optionsthas_keyt add_optiontfileststartupt SystemExittparsetmainRt InternalErrortverbosetdebugt tracebackt print_excRtexc_infotfinished(R?ROR$trctnew_rc((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR@@sd                     cCs$|ii|ƒ||i|iRRet handle_filesRR(RSRtatoit ValueErrortreplacetgetattrR7RURR&RYt check_files(R?RhR tflagstlflagstoptlistRWR R!tgftwhyRcR'tvaluet optionprefixt optionnameR$t handlernamethandler((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyRZºsl               cCsdS(sP Apply some user defined checks on the files given in filelist. This may modify filelist in place. A typical application is checking that at least n files are given. If this method returns anything other than None, the process is terminated with the return value as exit code. N(R(R?tfilelist((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyRss cCsÝ|iƒ|ioUdGHy|i|i}Wn,tttfj o|i|i}nXd|GHnH|iƒ|iodGHd|iGHHn|i ot i |i |iƒGHHn|oddGHdG|GHHndS(Ns Synopsis:RAsVersion:s %sRiHsNote:( t print_headertsynopsisRt NameErrortKeyErrorR&t__dict__t print_optionstversiontaboutRtstrip(R?tnoteR€((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR>s*         cCs ddGHdG|GHddGHHdS(NRiHsNote:((R?Rˆ((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pytnotice8s   cCs&ddGH|i|iGHddGHHdS(NRiH(RQRƒ(R?((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR?s  cCsl|i}dGH|p dGHdStd„|ƒ}td„|ƒ}||}x|D]}dG|GHqTWHdS(NsOptions and default settings:s NonecSs |idjS(s--(R(tx((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pytMscSs |idjS(R(R(RŠ((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR‹NsRA(R tfilter(R?R tlongtshorttitemsR ((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR„Fs   cCsdS(s3 This may process the files list in place. N(R(R?RW((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyRn\scCs|iƒdS(Ni(R>(R?targ((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pythandle_hcs cCs d|_dS(s! Turn on verbose output. iN(R](R?Ry((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pythandle_vhscCs|iƒdS(Ni(R>(R?R((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyt handle__helpos cCs d|_dS(s! Turn on verbose output. iN(R](R?Ry((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pythandle__verbosetscCsd|_d|_dS(Ni(R^RR\(R?R((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyt handle__debugzs cCs'|iƒti|i|iƒGHHdS(Ni(RRR‡t copyrightRƒ(R?R((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pythandle__copyright€s cCsA|iƒ|io#dGHHti|i|iƒGHHndGHHdS(Ns Examples:sNo examples available.i(RtexamplesRR‡Rƒ(R?R((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pythandle__examples‡s  cCsdS(s' Override this method as program entry point. The return value is passed to sys.exit() as argument. If it is None, 0 is assumed (meaning OK). Unhandled exceptions are reported with exit status code 1 (see __init__ for further details). N(R(R?((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR[”s N(-RHRIRJR RMRTRQRR€R…R†R˜t __copyright__R–RjR^R]t exceptionst ExceptionR\RRhRWRlRSR@RVRXRbReRZRsR>R‰RR„RnR‘R’R“R”R•R—R™R[(((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyRNîsf   L  X            cCsPdtfd„ƒY}|ƒ}|idp|iƒndG|iGHdGHdS(Nt MyApplicationcBs/eZdZeZeddƒgZd„ZRS(sTest Applications-vR]cSs dGHdS(NsVERBOSE, Yeah !((R?R((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR’ªs(RHRIRQt __version__R…R=R R’(((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyR¥ss-hsfiles:sBye...(RNRhR>RW(Rtcmd((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyt_test£s   t__main__($RJRšRžRRiRRkRtreR›R_RRRR"R%R(t getpasswdtcompilet _integerREt_integerRangeRER0R6R8R9R:R R;R<R=RLRMRNt CommandLineR RH(((s9/usr/lib64/python2.6/site-packages/mx/Misc/CommandLine.pyt s0`     %ÿ´