Server IP : 162.213.251.212 / Your IP : 13.59.19.57 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/proc/self/root/lib64/python2.7/Demo/pdist/ |
Upload File : |
� ��^c@s<dZddd��YZd�Zedkr8e�ndS(sHFramework for command line interfaces like CVS. See class CmdFrameWork.tCommandFrameWorkcBs\eZdZdZd ZdZd�Zd d�Zd�Z d�Z d d�Zd�ZRS( s�Framework class for command line interfaces like CVS. The general command line structure is command [flags] subcommand [subflags] [argument] ... There's a class variable GlobalFlags which specifies the global flags options. Subcommands are defined by defining methods named do_<subcommand>. Flags for the subcommand are defined by defining class or instance variables named flags_<subcommand>. If there's no command, method default() is called. The __doc__ strings for the do_ methods are used for the usage message, printed after the general usage message which is the class variable UsageMessage. The class variable PostUsageMessage is printed after all the do_ methods' __doc__ strings. The method's return value can be a suggested exit status. [XXX Need to rewrite this to clarify it.] Common usage is to derive a class, instantiate it, and then call its run() method; by default this takes its arguments from sys.argv[1:]. s;usage: (name)s [flags] subcommand [subflags] [argument] ...tcCsdS(s&Constructor, present for completeness.N((tself((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyt__init__#scCs�ddl}ddl}|dkr4|jd}ny|j||j�\}}Wn |jk ru}|j|�SX|j|�|s�|j�|j �S|d}d|}d|}yt ||�} Wn"tk r�|jd|f�SXyt ||�} Wntk rd} nXy |j|d| �\}}Wn.|jk rp}|jd |t|��SX|j�| ||�SdS( s3Process flags, subcommand and options, then run it.i����Niitdo_tflags_scommand %r unknownRssubcommand %s: ( tgetopttsystNonetargvtGlobalFlagsterrortusagetoptionstreadytdefaulttgetattrtAttributeErrortstr(RtargsRRtoptstmsgtcmdtmnametfnametmethodtflags((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pytrun's: cCsR|rNddGHdGHx+|D]#\}}dG|GdGt|�GHqWddGHndS(sWProcess the options retrieved by getopt. Override this if you have any options.t-i(sOptions:toptiontvalueN(trepr(RRtota((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyR Gs cCsdS(s*Called just before calling the subcommand.N((R((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyRQscCs%|r|GHn|ji|jjd6GHi}|j}x�xut|�D]g}|d dkrF|j|�rqqFnyt||�j}Wn d}nX|r�|||<q�qFqFW|js�Pn|jd}q9W|r dGH|j �}|j �x|D]}||GHq�Wn|jr!|jGHndS(s4Print usage message. Return suitable exit code (2).tnameiRiswhere subcommand can be:iN(tUsageMessaget __class__t__name__tdirthas_keyRt__doc__Rt __bases__tkeystsorttPostUsageMessage(RRt docstringstcR"tdoctnames((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyRUs8 cCs dGHdS(s\Default method, called when no subcommand is given. You should always override this.s'Nobody expects the Spanish Inquisition!N((R((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyRssN( R%t __module__R(R#RR,R RRR RRR(((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyRs cCs�ddl}dtfd��Y}|�}gdgdgdgddgdg}x9|D]1}dG|GdGH|j|�}d Gt|�GHqYWdS( s:Test script -- called when this module is run as a script.i����NtHellocBseZd�ZRS(cSs dGHdS(s0hello -- print 'hello world', needs no argumentssHello, worldN((RRR((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pytdo_hello}s(R%R1R3(((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyR2|sthellotspams-xRi sExit status:s ----------s ----------(RRRRR(RR2txtteststttsts((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyttestys t__main__N((R(RR:R%(((s(/usr/lib64/python2.7/Demo/pdist/cmdfw.pyt<module>su