/usr/lib/python2.6/site-packages
NameSizeModeActions
appdirs-1.4.0.dist-info/-0755rm
argparse-1.4.0.dist-info/-0755rm
babel/-0755rm
Babel-2.1.1.dist-info/-0755rm
Babel-2.3.4.dist-info/-0755rm
backports/-0755rm
backports.ssl_match_hostname-3.4.0.2-py2.6.egg-info/-0755rm
boto/-0755rm
boto-2.34.0-py2.6.egg-info/-0755rm
cffi-1.6.0-py2.6-linux-x86_64.egg/-0755rm
chardet/-0755rm
chardet-2.2.1-py2.6.egg-info/-0755rm
cinderclient/-0755rm
clcommon/-0755rm
cliff/-0755rm
cliff-1.15.0.dist-info/-0755rm
cliff-2.0.0.dist-info/-0755rm
clifftablib/-0755rm
cliff_tablib-1.1-py2.6.egg-info/-0755rm
cloudinit/-0755rm
cloud_init-0.7.5-py2.6.egg-info/-0755rm
cmd2-0.6.8-py2.6.egg-info/-0755rm
concurrent/-0755rm
cryptography-1.3.1-py2.6-linux-x86_64.egg/-0755rm
dateutil/-0755rm
dbus/-0755rm
debtcollector/-0755rm
debtcollector-0.8.0.dist-info/-0755rm
debtcollector-1.3.0.dist-info/-0755rm
decorator-4.0.9.dist-info/-0755rm
dict-0.0.5-py2.6.egg-info/-0755rm
distribute-0.6.10-py2.6.egg-info/-0755rm
dns/-0755rm
enum/-0755rm
enum34-1.0.4-py2.6.egg-info/-0755rm
enum34-1.1.3-py2.6.egg/-0755rm
funcsigs/-0755rm
funcsigs-1.0.2.dist-info/-0755rm
futures-3.0.3.dist-info/-0755rm
futures-3.0.5.dist-info/-0755rm
get-0.0.7-py2.6.egg-info/-0755rm
glanceclient/-0755rm
idna/-0755rm
idna-2.0.dist-info/-0755rm
idna-2.1-py2.6.egg/-0755rm
iniparse/-0755rm
iotop/-0755rm
iotop-0.3.2-py2.6.egg-info/-0755rm
ipaddress-1.0.14-py2.6.egg-info/-0755rm
ipaddress-1.0.16-py2.6.egg/-0755rm
iso8601/-0755rm
iso8601-0.1.10-py2.6.egg-info/-0755rm
iso8601-0.1.11.dist-info/-0755rm
jsonpatch-1.2-py2.6.egg-info/-0755rm
jsonpatch-1.11.dist-info/-0755rm
jsonpatch-1.13.dist-info/-0755rm
jsonpointer-1.9.dist-info/-0755rm
jsonpointer-1.10.dist-info/-0755rm
jsonschema/-0755rm
jsonschema-2.5.1.dist-info/-0755rm
keystoneauth1/-0755rm
keystoneauth1-1.1.0.dist-info/-0755rm
keystoneauth1-2.6.0.dist-info/-0755rm
keystoneclient/-0755rm
markdown/-0755rm
monotonic-0.4-py2.6.egg-info/-0755rm
monotonic-1.1.dist-info/-0755rm
ndg/-0755rm
ndg_httpsclient-0.4.0-py2.6.egg-info/-0755rm
netaddr/-0755rm
netaddr-0.7.18.dist-info/-0755rm
neutronclient/-0755rm
nose/-0755rm
nose-0.10.4-py2.6.egg-info/-0755rm
novaclient/-0755rm
oauth/-0755rm
oauth-1.0.1-py2.6.egg-info/-0755rm
openstack/-0755rm
openstackclient/-0755rm
openstacksdk-0.8.5.dist-info/-0755rm
oslo.config-2.4.0.dist-info/-0755rm
oslo.config-3.9.0.dist-info/-0755rm
oslo.i18n-2.6.0.dist-info/-0755rm
oslo.i18n-3.6.0.dist-info/-0755rm
oslo.serialization-1.9.0.dist-info/-0755rm
oslo.serialization-2.4.0.dist-info/-0755rm
oslo.utils-2.5.0.dist-info/-0755rm
oslo.utils-3.8.0.dist-info/-0755rm
oslo_config/-0755rm
oslo_i18n/-0755rm
oslo_serialization/-0755rm
oslo_utils/-0755rm
os_client_config/-0755rm
os_client_config-1.8.1.dist-info/-0755rm
os_client_config-1.17.0.dist-info/-0755rm
pbr/-0755rm
pbr-1.8.0.dist-info/-0755rm
pbr-1.9.1.dist-info/-0755rm
pip-7.1.2-py2.6.egg/-0755rm
pip-8.1.1-py2.6.egg/-0755rm
pkg_resources/-0755rm
positional/-0755rm
positional-1.1.0-py2.6.egg-info/-0755rm
post-0.0.5-py2.6.egg-info/-0755rm
prettytable-0.7.2-py2.6.egg-info/-0755rm
public-0.0.0-py2.6.egg-info/-0755rm
pyasn1/-0755rm
pyasn1-0.0.12a-py2.6.egg-info/-0755rm
pyasn1-0.1.9-py2.6.egg/-0755rm
pyasn1-0.1.9.dist-info/-0755rm
pycparser/-0755rm
pycparser-2.14-py2.6.egg/-0755rm
pycparser-2.14-py2.6.egg-info/-0755rm
pygments/-0755rm
Pygments-1.1.1-py2.6.egg-info/-0755rm
pyparsing-2.0.3.dist-info/-0755rm
pyparsing-2.1.1.dist-info/-0755rm
python_cinderclient-1.4.0.dist-info/-0755rm
python_cinderclient-1.6.0.dist-info/-0755rm
python_dateutil-1.4.1-py2.6.egg-info/-0755rm
python_glanceclient-1.1.0.dist-info/-0755rm
python_glanceclient-2.0.0.dist-info/-0755rm
python_keystoneclient-1.7.1.dist-info/-0755rm
python_keystoneclient-2.3.1.dist-info/-0755rm
python_neutronclient-3.1.0.dist-info/-0755rm
python_novaclient-2.31.0.dist-info/-0755rm
python_novaclient-4.0.0.dist-info/-0755rm
python_openstackclient-1.7.1.dist-info/-0755rm
python_openstackclient-2.4.0.dist-info/-0755rm
python_swiftclient-2.6.0.dist-info/-0755rm
python_swiftclient-3.0.0.dist-info/-0755rm
pytz/-0755rm
pytz-2015.6.dist-info/-0755rm
pytz-2016.4.dist-info/-0755rm
pyzor-1.0.0-py2.6.egg/-0755rm
query_string-0.0.5-py2.6.egg-info/-0755rm
repoze/-0755rm
repoze.lru-0.6-py2.6.egg-info/-0755rm
request-0.0.5-py2.6.egg-info/-0755rm
requests/-0755rm
requests-2.7.0.dist-info/-0755rm
requests-2.9.1.dist-info/-0755rm
requestsexceptions/-0755rm
requestsexceptions-1.1.3.dist-info/-0755rm
rhn/-0755rm
rpmUtils/-0755rm
rsa/-0755rm
rsa-3.4.2-py2.6.egg-info/-0755rm
self-0.0.5-py2.6.egg-info/-0755rm
setools/-0755rm
setuptools/-0755rm
setuptools-20.10.1.dist-info/-0755rm
six-1.9.0.dist-info/-0755rm
six-1.10.0.dist-info/-0755rm
sos/-0755rm
stevedore/-0755rm
stevedore-1.8.0.dist-info/-0755rm
stevedore-1.12.0.dist-info/-0755rm
supervisor/-0755rm
swiftclient/-0755rm
tablib/-0755rm
tablib-0.10.0.dist-info/-0755rm
unicodecsv/-0755rm
unicodecsv-0.14.1-py2.6.egg-info/-0755rm
urlgrabber/-0755rm
urllib3/-0755rm
urllib3-1.10.2-py2.6.egg-info/-0755rm
urllib3-1.12.dist-info/-0755rm
urllib3-1.15.1.dist-info/-0755rm
warlock/-0755rm
warlock-1.1.0-py2.6.egg-info/-0755rm
warlock-1.2.0-py2.6.egg-info/-0755rm
yum/-0755rm
yumutils/-0755rm
appdirs.py223740755editdlrm
appdirs.pyc206650644editdlrm
argparse.py892140644editdlrm
argparse.pyc668150644editdlrm
argparse.pyo664910644editdlrm
chardet-2.0.1-py2.6.egg-info16050644editdlrm
clsudo.py129530644editdlrm
clsudo.pyc113920644editdlrm
clsudo.pyo113920644editdlrm
cmd2.py650690644editdlrm
cmd2.pyc650190644editdlrm
configobj-4.6.0-py2.6.egg-info3120644editdlrm
configobj.py864470644editdlrm
configobj.pyc664120644editdlrm
configobj.pyo664120644editdlrm
dbus_bindings.py330644editdlrm
dbus_bindings.pyc1850644editdlrm
dbus_bindings.pyo1850644editdlrm
decorator.py157750644editdlrm
decorator.pyc144850644editdlrm
dict.py22390644editdlrm
dnspython-1.11.1-py2.6.egg-info12800644editdlrm
easy-install.pth2760644editdlrm
easy_install.py1260644editdlrm
easy_install.pyc3170644editdlrm
easy_install.pyo3170644editdlrm
get.py3220644editdlrm
hwdata.py81420644editdlrm
hwdata.pyc62830644editdlrm
hwdata.pyo62830644editdlrm
iniparse-0.3.1-py2.6.egg-info10850644editdlrm
ipaddress.py796590644editdlrm
ipaddress.pyc759000644editdlrm
jsonpatch.py159460644editdlrm
jsonpatch.pyc174810644editdlrm
jsonpatch.pyo172770644editdlrm
jsonpointer-1.0-py2.6.egg-info3020644editdlrm
jsonpointer.py66100644editdlrm
jsonpointer.pyc63680644editdlrm
jsonpointer.pyo63680644editdlrm
libproxy.py43300644editdlrm
libproxy.pyc39900644editdlrm
libproxy.pyo39900644editdlrm
lprettytable.py238490755editdlrm
lprettytable.pyc196190644editdlrm
lprettytable.pyo194720644editdlrm
Markdown-2.0.1-py2.6.egg-info13400644editdlrm
monotonic.py53450644editdlrm
monotonic.pyc54790644editdlrm
ndg_httpsclient-0.4.0-py2.6-nspkg.pth2960644editdlrm
ordereddict-1.1-py2.6.egg-info1830644editdlrm
ordereddict-1.2-py2.6.egg-info1830644editdlrm
ordereddict.py42210644editdlrm
ordereddict.pyc44210644editdlrm
ordereddict.pyo44210644editdlrm
pciutils-2.3.5-py2.6.egg-info2420644editdlrm
pkg_resources.py881960644editdlrm
pkg_resources.pyc928750644editdlrm
pkg_resources.pyo928750644editdlrm
post.py2260644editdlrm
prettytable.py542040644editdlrm
prettytable.pyc522520644editdlrm
prettytable.pyo512660644editdlrm
public.py46350644editdlrm
pyOpenSSL-0.15.1-py2.6.egg2357360644editdlrm
pyOpenSSL-16.0.0-py2.6.egg943080644editdlrm
pyparsing.py1582560644editdlrm
pyparsing.pyc1578590644editdlrm
pytz-2010h-py2.6.egg-info225770644editdlrm
query_string.py8400644editdlrm
README1190644editdlrm
repoze.lru-0.6-py2.6-nspkg.pth3070644editdlrm
request.py2070644editdlrm
requests-2.6.0-py2.6.egg-info403570644editdlrm
rhnlib-2.5.22-py2.6.egg-info3390644editdlrm
secureio.py92220644editdlrm
secureio.pyc47210644editdlrm
secureio.pyo47210644editdlrm
self.py7280644editdlrm
setuptools-0.6c11-py2.6.egg-info1440644editdlrm
setuptools-18.3.2-py2.6.egg3590330755editdlrm
setuptools-20.9.0-py2.6.egg4728320644editdlrm
setuptools.pth340644editdlrm
site.py23620644editdlrm
site.pyc17710644editdlrm
site.pyo17710644editdlrm
six.py296640644editdlrm
six.pyc293300644editdlrm
six.pyo269110644editdlrm
supervisor-2.1-py2.6.egg-info7970644editdlrm
urlgrabber-3.9.1-py2.6.egg-info22850644editdlrm
validate.py467680644editdlrm
validate.pyc473840644editdlrm
validate.pyo473840644editdlrm
Edit: /usr/lib/python2.6/site-packages/cmd2.pyc (65019B)
{DVc@s$dZddkZddkZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk Z ddk Z ddk Z ddkZddkZddklZlZddklZddkZdZeiddjoeiindeifd YZd Zd Zd Zeei_gZd dZ de!fdYZ"dZ#ei$oKy"ddk%Z%dZ&dZ'Wn"e(j odZ&e&Z'nXneidjoe)Z*y8ei+dde,dei-dei-dei-e,Z*Wnei.e/e0fj onXe*odZ&dZ'ndZ&e&Z'n>e)Z*y8ei+dde,dei-dei-dei-e,Z*Wne1j oydZ2ei3d de,dei-dei-Z4e4i5i6e2e4i5i7ei3dde,dei-dei-Z4e4i8i9e2jo e,Z*nWne:j onXne:j onXe*od!Z&d"Z'nd#Z&e&Z'eii;d$d%e<fd&YZ=d'e>fd(YZ?d)Z@d*ZAd+eBfd,YZCd-e:fd.YZDd/d0ZEd1eiFfd2YZFd3e<fd4YZGd5eHfd6YZId7e:fd8YZJd9ZKd:eLfd;YZMd<eLfd=YZNd>eNfd?YZOd@e iPfdAYZQeRdBjoeiSdCeiTndS(Ds-Variant on standard library's cmd with extra features. To use, simply import cmd2.Cmd instead of cmd.Cmd; use precisely as though you were using the standard library's cmd, while enjoying the extra features. Searchable command history (commands: "hi", "li", "run") Load commands from file, save to file, edit commands in file Multi-line commands Case-insensitive commands Special-character shortcut commands (beyond cmd's "@" and "!") Settable environment parameters Optional _onchange_{paramname} called when environment parameter changes Parsing commands with `optparse` options (flags) Redirection to file with >, >>; input from file with < Easy transcript-based testing of applications (see example/example.py) Bash-style ``select`` available Note that redirection with > and | will only work if `self.stdout.write()` is used in place of `print`. The standard library's `cmd` module is written to use `self.stdout.write()`, - Catherine Devlin, Jan 03 2008 - catherinedevlin.blogspot.com mercurial repository at http://www.assembla.com/wiki/show/python-cmd2 iN(tInteractiveConsoletInteractiveInterpreter(t make_options0.6.8iit OptionParsercBs)eZdddZdZdZRS(icCs t|i_|o |GHndS(N(tTruetvaluest_exit(tselftstatustmsg((s(/usr/lib/python2.6/site-packages/cmd2.pytexitAs cOs?y|iiGHWntj onXtii|||dS(N(t_funct__doc__tAttributeErrortoptparseRt print_help(Rtargstkwargs((s(/usr/lib/python2.6/site-packages/cmd2.pyRFs cCsti|dS(serror(msg : string) Print a usage message incorporating 'msg' to stderr and exit. If you override this in a subclass, it should not return -- it should either exit or raise an exception. N(Rt OptParseError(RR ((s(/usr/lib/python2.6/site-packages/cmd2.pyterrorMsN(t__name__t __module__tNoneR RR(((s(/usr/lib/python2.6/site-packages/cmd2.pyR@s cCs=did|Dd}ti||}||iS(s Preserves the spacing originally in the argument after the removal of options. >>> remaining_args('-f bar bar cow', ['bar', 'cow']) 'bar cow' s\s+css"x|]}ti|VqWdS(N(tretescape(t.0ta((s(/usr/lib/python2.6/site-packages/cmd2.pys ^s s\s*$(tjoinRtsearchtstart(toldArgst newArgListtpatterntmatchObj((s(/usr/lib/python2.6/site-packages/cmd2.pytremaining_argsVscCs,yt||SWntj odSXdS(sReturns an attribute's value, or None (no error) if undefined. Analagous to .get() for dictionaries. Useful when checking for value of options that may not have been defined on a given method.N(tgetattrR R(tobjtattr((s(/usr/lib/python2.6/site-packages/cmd2.pyt _attr_get_bsc CsNy3tid|gdtidtiidSWntj odSXdS(Ntwhichtstdouttstderri(t subprocesstPopentPIPEtSTDOUTt communicatetOSErrorR(teditor((s(/usr/lib/python2.6/site-packages/cmd2.pyt_whichls3targcs`ttp gnx*D]"}titi|iq$Wfd}|S(sUsed as a decorator and passed a list of optparse-style options, alters a cmd2 method to populate its ``opts`` argument from its raw text argument. Example: transform def do_something(self, arg): into @options([make_option('-q', '--quick', action="store_true", help="Makes things fast")], "source dest") def do_something(self, arg, opts): if opts.quick: self.fast_button = True cstxD]}i|qWididf_fd}diif|_|S(Ns%s [options] %sicsyWi|i\}}t||}t|to|i|}n|}Wn(tij o}|GHidSXt |dodS|||}|S(NR( t parse_argstsplitR"t isinstancet ParsedStringtwith_args_replacedRRRthasattrR(tinstanceR2toptsRtnewArgstetresult(tfunct optionParser(s(/usr/lib/python2.6/site-packages/cmd2.pytnew_funcs  s%s %s(Rt add_optiont set_usageRR R t format_help(R>toptR@(t option_listtarg_desc(R?R>s(/usr/lib/python2.6/site-packages/cmd2.pyt option_setups  (R5tlisttoptions_definedtappendt pyparsingtLiteraltget_opt_string(RERFRDRG((RERFs(/usr/lib/python2.6/site-packages/cmd2.pytoptionsvs  tPasteBufferErrorcBsMeZeid djo dZneid djondZdZRS(itwinsRedirecting to or from paste buffer requires pywin32 to be installed on operating system. Download from http://sourceforge.net/projects/pywin32/tdarsRedirecting to or from paste buffer requires xclip to be installed on operating system. On Debian/Ubuntu, 'sudo apt-get install xclip' will install it.cCsti||idS(N(t Exceptiont__init__terrmsg(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRSs(RRtsystplatformRTRS(((s(/usr/lib/python2.6/site-packages/cmd2.pyROs  sWRedirecting to or from paste buffer requires %s to be installed on operating system. %scCsGtidyti}Wntj o d}nXti|S(Nit(twin32clipboardt OpenClipboardtGetClipboardDatat TypeErrortCloseClipboard(R=((s(/usr/lib/python2.6/site-packages/cmd2.pytget_paste_buffers   cCs2tidtiti|tidS(Ni(RXRYtEmptyClipboardtSetClipboardTextR\(ttxt((s(/usr/lib/python2.6/site-packages/cmd2.pytwrite_to_paste_buffers   cGsttddS(Ntpywin32s6Download from http://sourceforge.net/projects/pywin32/(Rbs6Download from http://sourceforge.net/projects/pywin32/(R/t pastebufferr(R((s(/usr/lib/python2.6/site-packages/cmd2.pyR]stdarwins pbcopy -helptshellR(tstdinR)c Cs=tiddtdtidtidti}|iiS(Ns pbcopy -helpReR(RfR)(R*R+RR,R(tread(t pbcopyproc((s(/usr/lib/python2.6/site-packages/cmd2.pyR]s0c CsGtiddtdtidtidti}|i|idS(NtpbcopyReR(RfR)(R*R+RR,R.tencode(R`Rh((s(/usr/lib/python2.6/site-packages/cmd2.pyRas0cGsttddS(NRisFOn MacOS X - error should not occur - part of the default installation(spbcopysFOn MacOS X - error should not occur - part of the default installation(R/Rc(R((s(/usr/lib/python2.6/site-packages/cmd2.pyR]ssxclip -o -sel clipsTesting for presence of xclip.sxclip -sel clipcCs4tiddtdtidti}|iiS(Nsxclip -o -sel clipReR(Rf(R*R+RR,R(Rg(t xclipproc((s(/usr/lib/python2.6/site-packages/cmd2.pyR]s'cCstiddtdtidti}|ii|i|iitiddtdtidti}|ii|i|iidS(Nsxclip -sel clipReR(Rftxclip(R*R+RR,RftwriteRjtclose(R`Rk((s(/usr/lib/python2.6/site-packages/cmd2.pyRas ' 'cGsttddS(NRls;On Debian/Ubuntu, install with "sudo apt-get install xclip"(sxclips;On Debian/Ubuntu, install with "sudo apt-get install xclip"(R/Rc(R((s(/usr/lib/python2.6/site-packages/cmd2.pyR]ss R6cBseZdZdZRS(cCs>td|ii|iif}|i|_|i|_|S(Ns%s %s(R6tparsedtcommandRtparser(Rtnew((s(/usr/lib/python2.6/site-packages/cmd2.pytfull_parsed_statements"  cCsEt|}|i|_|i|_||id<||iid<|S(NR(R6RoRqt statement(RtnewargsRr((s(/usr/lib/python2.6/site-packages/cmd2.pyR7 s     (RRRsR7(((s(/usr/lib/python2.6/site-packages/cmd2.pyR6s t StubbornDictcBsGeZdZdZeZdZdZdZedZ RS(sKDictionary that tolerates many input formats. Create it with stubbornDict(arg) factory function. >>> d = StubbornDict(large='gross', small='klein') >>> sorted(d.items()) [('large', 'gross'), ('small', 'klein')] >>> d.append(['plain', ' plaid']) >>> sorted(d.items()) [('large', 'gross'), ('plaid', ''), ('plain', ''), ('small', 'klein')] >>> d += ' girl Frauelein, Maedchen\n\n shoe schuh' >>> sorted(d.items()) [('girl', 'Frauelein, Maedchen'), ('large', 'gross'), ('plaid', ''), ('plain', ''), ('shoe', 'schuh'), ('small', 'klein')] cCsti|ti|dS(N(tdicttupdateRvtto_dict(RR2((s(/usr/lib/python2.6/site-packages/cmd2.pyRx#scCs|i||S(N(Rx(RR2((s(/usr/lib/python2.6/site-packages/cmd2.pyt__iadd__&s cCs&ti|}|it||S(N(tcopyRxt stubbornDict(RR2tselfcopy((s(/usr/lib/python2.6/site-packages/cmd2.pyt__add__)scCs&ti|}|it||S(N(R{RxR|(RR2R}((s(/usr/lib/python2.6/site-packages/cmd2.pyt__radd__-scCst|do|i}nt|doh}x||D]j}|i}|oQ|idd}|d}t|djo|d}nd}|||>> sorted(stubbornDict('cow a bovine\nhorse an equine').items()) [('cow', 'a bovine'), ('horse', 'an equine')] >>> sorted(stubbornDict(['badger', 'porcupine a poky creature']).items()) [('badger', ''), ('porcupine', 'a poky creature')] >>> sorted(stubbornDict(turtle='has shell', frog='jumpy').items()) [('frog', 'jumpy'), ('turtle', 'has shell')] (RxRvRy(R2tkwargR=R((s(/usr/lib/python2.6/site-packages/cmd2.pyR|Gs  cCsb|oNy&ttii|di}Wq^tj od|d}q^Xn t}|S(Nis< %s(topentostpatht expanduserRgtIOErrorR](tfnameR=((s(/usr/lib/python2.6/site-packages/cmd2.pytreplace_with_file_contentsVs& tEmbeddedConsoleExitcBseZRS((RR(((s(/usr/lib/python2.6/site-packages/cmd2.pyR`stEmptyStatementcBseZRS((RR(((s(/usr/lib/python2.6/site-packages/cmd2.pyRcst cCsUt|do|i||St||jo||g|| }n|SdS(s+analogous to str.ljust, but works for liststljustN(R8RR(txtwidthtfillchar((s(/usr/lib/python2.6/site-packages/cmd2.pyRfs tCmdc BseZeZeZdZeZdei ei Z hdd6dd6dd6dd 6Z d i ZeZd i Zd Zd ZeZdnZgZeZeZeZeZdnZdZedZdZdndZ dZ!eZ"dZ#e$i%i&dZ'e'pZe(i)d djo dZ'q]x9dddddddgD]Z'e*e'oPq=q=Wnhhde6d e6d!6hd"e6d#e6d$6hd%e6d#e6d&6hd'e6d#e6d(6hd)e6d#e6d*6hd+e6d#e6d,6hd-e6d.e6d/6Z+e)i,d0jZ-d1Z.d2Z/d3Z0d4Z1d5Z2ei3Z4ei5ei6ei7gZ8e8i9d6ei:d7ei;ei<d8AZ=d9gZ>eZ?gZ@d:ZAd;ZBd<ZCd=ZDd>ZEd?ZFd@ZGdAZHdBZIdCZJdDZKdEZLdFZMdGZNdndHZOdIZPePZQdJZReRZSeRZTdKdLZUeVeWdMdNdOdPddQgdRZXdSZYdTZZdUZ[dVZ\eVeWdWdXdOdPddYgdZd[d\Z]d]Z^d^Z_e]Z`e_Zae_Zbd_ZcecZdeieeifeigd`Adaeieeife dbdcei<ZhddZideZjdndfZkelimdgZndndhZoeoZpdiZqeqZrdjZsdkZtdlZudmZvRS(os> u !#$%.:?@_thelpt?Ret!tloadt@t_relative_loads@@s&run r list l history hi ed edit li eofsset ed edit exitR`s command.txtt>s prompt colors Colorized output (*nix only) continuation_prompt On 2nd+ line of input debug Show full error stack on error default_file_name for ``save``, ``load``, etc. editor Program used by ``edit`` case_insensitive upper- and lower-case both OK feedback_to_output include nonessentials in `|`, `>` results quiet Don't print nonessential feedback echo Echo command issued into output timing Report execution times abbrev Accept abbreviated commands cCsD|o9|ii||ddjo|iidq@ndS(sGConvenient shortcut for self.stdout.write(); adds newline if necessary.is N(R(Rm(RR ((s(/usr/lib/python2.6/site-packages/cmd2.pytpoutputscCs'|iotint|GHdS(N(tdebugt tracebackt print_exctstr(RRTRt((s(/usr/lib/python2.6/site-packages/cmd2.pytperrors cCs2|ip$|io|i|q.|GHndS(sFor printing nonessential feedback. Can be silenced with `quiet`. Inclusion in redirected output is controlled by `feedback_to_output`.N(tquiettfeedback_to_outputR(RR ((s(/usr/lib/python2.6/site-packages/cmd2.pyt pfeedbacks  itEDITORiRPtnotepadtgedittkatetvimtvitemacstnanotpicosstboldsstcyanstbluestredstmagentastgreensst underlinetWindowscCsD|io6|i|ijo#|i|t||i|tS|S(sGiven a string (``val``), returns that string wrapped in UNIX-style special characters that turn on (and then off) text color and style. If the ``colors`` environment paramter is ``False``, or the application is running on Windows, will return ``val`` unchanged. ``color`` should be one of the supported strings (or styles): red/blue/green/cyan/magenta, bold, underline(tcolorsR(tinitial_stdoutt colorcodesRtFalse(RRtcolor((s(/usr/lib/python2.6/site-packages/cmd2.pytcolorizes#cCsS|iidh|iodpdd6t|id6di|id6dS( s)Summary report of interactive parameters.s Commands are %(casesensitive)scase-sensitive. Commands may be terminated with: %(terminators)s Settable parameters: %(settable)s snot RWt casesensitivet terminatorsRtsettableN(R(Rmtcase_insensitiveRRRR(RR((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_cmdenvironments  cCs|ot|i|}|oZt||}y|iid|iWqwtj otii||dqwXqntii||dS(Ntfilei( t func_namedR#R?RR(R tcmdRtdo_help(RR2tfuncnametfn((s(/usr/lib/python2.6/site-packages/cmd2.pyRs$cOstii|||ti|_t|_h|_t |i i dt |_ |i g}t|D]%}|ido||dqlql~|_|idS(Ntreversetdo_i(RRRSRUR(RtHistorythistorytpystatetsortedt shortcutstitemsRtreserved_wordstdirt startswithtkeywordst _init_parser(RRRt_[1]R((s(/usr/lib/python2.6/site-packages/cmd2.pyRSs   ,cCs:didt|iD}|iid|dS(s%Lists single-key shortcuts available.s css+x$|]}d|d|dfVqWdS(s%s: %siiN((Rtsc((s(/usr/lib/python2.6/site-packages/cmd2.pys s s,Single-key shortcuts for other commands: %s N(RRRR(Rm(RRR=((s(/usr/lib/python2.6/site-packages/cmd2.pyt do_shortcutss"cCsdS(RW((R((s(/usr/lib/python2.6/site-packages/cmd2.pytss/*s*/t;c CsFti|idti|iBtid|iBd}tig}|iD]-}|t|do|p ti|qU~d}tidA}tig}|i D]}|ti |d|i q~d|_ |i ti |id }ti d d d } |iitiid |i|iBtiB} ti| ti||Ad | dti|ti|d | idd} |i o'|i id|idn|ioti|_notitid|_|iid|i |Ati|id | idd|id|_|i |Ati|d | idd|dti|| A|Ad | idd| |_|ii|i|ti||A| A|Ad | idddti|| |_|iid|_|i||iB|iB|iB|i ti|d | B|_|ii|itid} | idti |id} | d}|it | ti|tidti| tid B|_!|i!i|idS( s  >>> c = Cmd() >>> c.multilineCommands = ['multiline'] >>> c.case_insensitive = True >>> c._init_parser() >>> print (c.parser.parseString('').dump()) [] >>> print (c.parser.parseString('').dump()) [] >>> print (c.parser.parseString('/* empty command */').dump()) [] >>> print (c.parser.parseString('plainword').dump()) ['plainword', ''] - command: plainword - statement: ['plainword', ''] - command: plainword >>> print (c.parser.parseString('termbare;').dump()) ['termbare', '', ';', ''] - command: termbare - statement: ['termbare', '', ';'] - command: termbare - terminator: ; - terminator: ; >>> print (c.parser.parseString('termbare; suffx').dump()) ['termbare', '', ';', 'suffx'] - command: termbare - statement: ['termbare', '', ';'] - command: termbare - terminator: ; - suffix: suffx - terminator: ; >>> print (c.parser.parseString('barecommand').dump()) ['barecommand', ''] - command: barecommand - statement: ['barecommand', ''] - command: barecommand >>> print (c.parser.parseString('COMmand with args').dump()) ['command', 'with args'] - args: with args - command: command - statement: ['command', 'with args'] - args: with args - command: command >>> print (c.parser.parseString('command with args and terminator; and suffix').dump()) ['command', 'with args and terminator', ';', 'and suffix'] - args: with args and terminator - command: command - statement: ['command', 'with args and terminator', ';'] - args: with args and terminator - command: command - terminator: ; - suffix: and suffix - terminator: ; >>> print (c.parser.parseString('simple | piped').dump()) ['simple', '', '|', ' piped'] - command: simple - pipeTo: piped - statement: ['simple', ''] - command: simple >>> print (c.parser.parseString('double-pipe || is not a pipe').dump()) ['double', '-pipe || is not a pipe'] - args: -pipe || is not a pipe - command: double - statement: ['double', '-pipe || is not a pipe'] - args: -pipe || is not a pipe - command: double >>> print (c.parser.parseString('command with args, terminator;sufx | piped').dump()) ['command', 'with args, terminator', ';', 'sufx', '|', ' piped'] - args: with args, terminator - command: command - pipeTo: piped - statement: ['command', 'with args, terminator', ';'] - args: with args, terminator - command: command - terminator: ; - suffix: sufx - terminator: ; >>> print (c.parser.parseString('output into > afile.txt').dump()) ['output', 'into', '>', 'afile.txt'] - args: into - command: output - output: > - outputTo: afile.txt - statement: ['output', 'into'] - args: into - command: output >>> print (c.parser.parseString('output into;sufx | pipethrume plz > afile.txt').dump()) ['output', 'into', ';', 'sufx', '|', ' pipethrume plz', '>', 'afile.txt'] - args: into - command: output - output: > - outputTo: afile.txt - pipeTo: pipethrume plz - statement: ['output', 'into', ';'] - args: into - command: output - terminator: ; - suffix: sufx - terminator: ; >>> print (c.parser.parseString('output to paste buffer >> ').dump()) ['output', 'to paste buffer', '>>', ''] - args: to paste buffer - command: output - output: >> - statement: ['output', 'to paste buffer'] - args: to paste buffer - command: output >>> print (c.parser.parseString('ignore the /* commented | > */ stuff;').dump()) ['ignore', 'the /* commented | > */ stuff', ';', ''] - args: the /* commented | > */ stuff - command: ignore - statement: ['ignore', 'the /* commented | > */ stuff', ';'] - args: the /* commented | > */ stuff - command: ignore - terminator: ; - terminator: ; >>> print (c.parser.parseString('has > inside;').dump()) ['has', '> inside', ';', ''] - args: > inside - command: has - statement: ['has', '> inside', ';'] - args: > inside - command: has - terminator: ; - terminator: ; >>> print (c.parser.parseString('multiline has > inside an unfinished command').dump()) ['multiline', ' has > inside an unfinished command'] - multilineCommand: multiline >>> print (c.parser.parseString('multiline has > inside;').dump()) ['multiline', 'has > inside', ';', ''] - args: has > inside - multilineCommand: multiline - statement: ['multiline', 'has > inside', ';'] - args: has > inside - multilineCommand: multiline - terminator: ; - terminator: ; >>> print (c.parser.parseString('multiline command /* with comment in progress;').dump()) ['multiline', ' command /* with comment in progress;'] - multilineCommand: multiline >>> print (c.parser.parseString('multiline command /* with comment complete */ is done;').dump()) ['multiline', 'command /* with comment complete */ is done', ';', ''] - args: command /* with comment complete */ is done - multilineCommand: multiline - statement: ['multiline', 'command /* with comment complete */ is done', ';'] - args: command /* with comment complete */ is done - multilineCommand: multiline - terminator: ; - terminator: ; >>> print (c.parser.parseString('multiline command ends\n\n').dump()) ['multiline', 'command ends', '\n', '\n'] - args: command ends - multilineCommand: multiline - statement: ['multiline', 'command ends', '\n', '\n'] - args: command ends - multilineCommand: multiline - terminator: ['\n', '\n'] - terminator: ['\n', '\n'] >>> print (c.parser.parseString('multiline command "with term; ends" now\n\n').dump()) ['multiline', 'command "with term; ends" now', '\n', '\n'] - args: command "with term; ends" now - multilineCommand: multiline - statement: ['multiline', 'command "with term; ends" now', '\n', '\n'] - args: command "with term; ends" now - multilineCommand: multiline - terminator: ['\n', '\n'] - terminator: ['\n', '\n'] >>> print (c.parser.parseString('what if "quoted strings /* seem to " start comments?').dump()) ['what', 'if "quoted strings /* seem to " start comments?'] - args: if "quoted strings /* seem to " start comments? - command: what - statement: ['what', 'if "quoted strings /* seem to " start comments?'] - args: if "quoted strings /* seem to " start comments? - command: what is[^=]toutputt parseStringt terminators EOFtcaselesstmultilineCommandRpt|t identCharscSsdS(RW((R((s(/usr/lib/python2.6/site-packages/cmd2.pyRstignoretpipeTocSs|diS(i(R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRstoutputTocSs|diS(i(tlower(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRscSs|diS(i(R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRscSs|diS(i(R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRsRRtcSs|diS(i(R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRscSs|diS(i(R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRstsuffixcSs|diS(i(R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRst>(sstdout(sstdout(sstdout(sstdout(RoRt Statekeepert kept_stateRUtkept_sysR*R+RR,tredirectRfR(RRtcan_cliptEnvironmentErrorRRRRRttempfilet TemporaryFileRmR](RRtR0((s(/usr/lib/python2.6/site-packages/cmd2.pyR"/s$ 0   /cCs|io|iio8|iip'|iidt|iiqnF|iio8x5|i i D] }|iii |pdqlWn|ii |ii |ii d|_ndS(NiRW(R2RoRRR(tseekRaRgRR4R.RmRntrestoreR3R(RRtR=((s(/usr/lib/python2.6/site-packages/cmd2.pyR)Ds    "   cCs|i|}|ii|_|i|ii}|p|i|Syt||}Wntj o|i|SX||}|S(sInterpret the argument as though it had been typed in response to the prompt. This may be overridden, but should not normally need to be; see the precmd() and postcmd() methods for useful execution hooks. The return value is a flag indicating whether interpretation of commands by the interpreter should stop. This (`cmd2`) version of `onecmd` already override's `cmd`'s `onecmd`. (RoRtlastcmdRRpt_defaultR#R (RR*RtRR>R((s(/usr/lib/python2.6/site-packages/cmd2.pyR&Rs  cCsT|i}|io(ti|}|p|idSn|i|i|S(N(Rstdefault_to_shellRtsystemRRtdefault(RRtR2R=((s(/usr/lib/python2.6/site-packages/cmd2.pyR<js   cCs|io0yt|}Wqtj o d}qXnc|ii||ii|ii}t|p d}n |ddjo|d }n|S(sQcopied from cmd's cmdloop; like raw_input, but accounts for changed stdin, stdouttEOFis ( t use_rawinputt raw_inputtEOFErrorR(RmtflushRftreadlineR(RtpromptR*((s(/usr/lib/python2.6/site-packages/cmd2.pyR-rs    cCs|i|io|io]yCddk}|i|_|i|i|i|idWnt j onXnz|t j o ||_ n|i o!|i i t|i dnt }x| oz|io|iid}n|i|i}|iot|ito|i i |dn|i|}qW|iWd|io|io:y ddk}|i|iWnt j onXn|SX(sRepeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument. iNs : completes i(tpreloopRAt completekeyREt get_completert old_completert set_completertcompletetparse_and_bindt ImportErrorRtintroR(RmRtcmdqueuetpopR-RFtechoR5RfRR,tpostloop(RRORERR*((s(/usr/lib/python2.6/site-packages/cmd2.pyt_cmdloops>      !   cCs|iS(N(t_STOP_SCRIPT_NO_EXIT(RR2((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_EOFscCs|iS(N(t_STOP_AND_EXIT(RR2((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_quitss Your choice? c CsSt|tot|i|i}ng}x|D]}}t|to|i||fq<y|i|d|dfWq<tj o"|i|d|dfq<Xq<Wx;t|D]-\}\}}|id|d|fqWxQtoIt |}y#t |}||dd} PWqt j oqXqW| S(sPresents a numbered menu to the user. Modelled after the bash shell's SELECT. Returns the item chosen. Argument ``options`` can be: | a single string -> will be split into one-word options | a list of strings -> will be offered as options | a list of tuples -> interpreted as (value, text), so that the return value can differ from the text advertised to the user iis %2d. %s ( R5t basestringtzipR4RJt IndexErrort enumerateRRRBtintt ValueError( RRNRFt fulloptionsRDtidxtvaluettexttresponseR=((s(/usr/lib/python2.6/site-packages/cmd2.pytselects0 $    s-ls--longtactiont store_truesdescribe function of parametercCs |ii}h}d}xi|iD]^}| p|i|o@d|tt||f||(RR2((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_shellscs_id<|iidi}io iph}td|id|ioi|nd}fd}fd}|id<|id <|id <|id : Executes a Python command. py: Enters interactive Python mode. End with ``Ctrl-D`` (Unix) / ``Ctrl-Z`` (Windows), ``quit()``, '`exit()``. Non-python commands can be issued with ``cmd("your command")``. Run python code from external files with ``run("filename.py")`` Ritlocalss.import sys, os;sys.path.insert(0, os.getcwd())cSs tdS(N(R(((s(/usr/lib/python2.6/site-packages/cmd2.pytquit%scsi|dS(Ns (R,(R2(R(s(/usr/lib/python2.6/site-packages/cmd2.pyR,'scsVy-t|}i|i|iWn"tj o}i|nXdS(N(RtruncodeRgRnRR(R2RR<(Rtinterp(s(/usr/lib/python2.6/site-packages/cmd2.pytrun)s  R{R RR~sFType "help", "copyright", "credits" or "license" for more information.RfR(tbannersPython %s on %s %s (%s) %sN(sstdinsstdout(RRoRRt locals_in_pyRR|R1RUR(RftinteracttversionRVt __class__Rtdo_pyR RR:(RR2t localvarsR{R,R~tcprtt keepstate((RR}s(/usr/lib/python2.6/site-packages/cmd2.pyRs0           -s-ss--scripts"Script format; no separation linesRFs$(limit on which commands to include)cCsl|o|ii|}n |i}x?|D]7}|io|i|q-|ii|iq-WdS(s history [arg]: lists past commands issued | no arg: list all | arg is integer: list one history item, by index | arg is string: string search | arg is /enclosed in forward-slashes/: regular expression search N(RtgettscriptRR(Rmtpr(RR2R:Rthi((s(/usr/lib/python2.6/site-packages/cmd2.pyt do_history?s   cCsFy+|o|ii|dS|idSWntj odSXdS(Ni(RRR[R(RR2((s(/usr/lib/python2.6/site-packages/cmd2.pyt last_matchingRs cCsmy|ii|pd}Wn%tj o|ii|}nXx!|D]}|i|iqLWdS(sqlist [arg]: lists last command issued no arg -> list most recent command arg is integer -> list one history item, by index a..b, a:b, a:, ..b -> list spans from a (or start) to b (or end) arg is string -> list all commands matching string search arg is /enclosed in forward-slashes/ -> regular expression search s-1N(RtspanR[RRR(RR2RR((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_listZs cCs|iptdn|i}|o?y|it|}Wqvtj o|}d}qvXn|id}|o=tti i |d}|i |pd|i nti d|i|f|i|dS(s@ed: edit most recent command in text editor ed [N]: edit numbered command from history ed [filename]: edit specified file name commands are run after editor is closed. "set edit (program-name)" or set EDITOR environment variable to control which editing program is used.sGPlease use 'set editor' to specify your text editing program of choice.RWiR/s%s %sN(R0R6tdefault_file_nameRR]R^RRRRRRmRnR>tdo__load(RR2tfilenametbuffertf((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_edns    t*R`s/\Rc Cs8y|ii|}Wn9tij o*|id|t|iinX|ip|i }|i djodi |i }n6|i o|i t |i d}n|i d}yGttii|d}|i||i|id|Wn)tj o}|id|nXd S( s`save [N] [filename.ext]` Saves command from history to file. | N => Number of command (from history), or `*`; | most recent command if omitteds#Could not understand save target %sRs iiR/s Saved to %ssError saving %sN(t saveparserRRKtParseExceptionRt SyntaxErrortdo_saveR RRR`RRR]RRRRRmRnRRR(RR2RRtsavemeRR<((s(/usr/lib/python2.6/site-packages/cmd2.pyRs&    cCst|tot|d}n|ii|}|oti|id}npti i |}ytti i |d}Wn;t j o/tdti i ||i fd}nX|S(Ntris%s.%s( R5RRturlretmatchturllibturlopentgroupRRRRtdefaultExtension(RRR=R((s(/usr/lib/python2.6/site-packages/cmd2.pytread_file_or_urlscCsz|oo|idd}|d|dpdgd}}tii|ipd|}|id||fndS(s Runs commands in script at file or URL; if this is called from within an already-running script, the filename will be interpreted relative to the already-running script's directory.iiRWs%s %sN(R4RRRRtcurrent_script_dirR(RR2t targetnameR((s(/usr/lib/python2.6/site-packages/cmd2.pytdo__relative_loads #s(https?://[-\w\./]+)c Cs"|djo |i}n<|idd}|d|dpdgdi}}y|i|}Wn-tj o!}|id||fdSXt|d }||_t |_ d|_ |_ t ii|d|_|i}|ii|id|_|o ||ijS( s-Runs script of command(s) from a file or URL.iiRWs%Problem accessing script from %s: %sNRfRARFR.R(sstdins use_rawinputspromptscontinuation_promptscurrent_script_dir(RRR4RRRRR1RfRRARFR.RRRRTRnR:R;RU(RR2RRRR<RR((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_loads(  )       cCs:|i|}|i||o|i|}ndS(s%run [arg]: re-runs an earlier command no arg -> run most recent command arg is integer -> run one history item, by index arg is string -> run most recent command by string search arg is /enclosed in forward-slashes/ -> run most recent by regex N(RRR,(RR2trunmeR((s(/usr/lib/python2.6/site-packages/cmd2.pytdo_runs  cCsayttii|}Wn(tj o|iid|dSX|i}|i|S(NsCouldn't read from file %s RW( RRRRRR(RmRgRn(RRttsourceRtdata((s(/usr/lib/python2.6/site-packages/cmd2.pyt fileimports  csmdtffdY}|i_tidgt_|}ti}|i|}|idS(Nt TestMyAppCasecseZiZRS((RRRtCmdApp((R(s(/usr/lib/python2.6/site-packages/cmd2.pyRsi( t Cmd2TestCaseRt testfilesRUtargvtunittesttTextTestRunnerR~t printErrors(RtcallargsRttestcasetrunnerR=((Rs(/usr/lib/python2.6/site-packages/cmd2.pytrunTranscriptTestss   cCs1x*|D]"}|i|do|iSqWdS(Ns (R,RW(RRtinitial_command((s(/usr/lib/python2.6/site-packages/cmd2.pytrun_commands_at_invocationsc Cs}ti}|idddddddd|i\}}|io|i|n|i|p|indS( Ns-ts--testtdestttestReRfRs1Test against transcript(s) in FILE (wildcards OK)(RRRAR3RRRRT(RRqtcalloptsR((s(/usr/lib/python2.6/site-packages/cmd2.pytcmdloop s  N(wRRRRRRRR.R(RKt alphanumst alphas8bitRRR4R!R=tnoSpecialParseRRRRRRRRRRR2RR|RRRRRWRURtenvironRR0RURVR1RR>RRRRRSRtEmptyRRtpythonStyleCommentt cStyleCommentRtaddParseActionRLRRRRRRRRRRoRRRR,R R"R)R&R<R-RTRVtdo_eofRXtdo_exittdo_qRdRNRRlRwRxRyRRRRtdo_hitdo_ltdo_liRtdo_editRRtnumsRRRRRtcompileRRRRtdo_rRRRR(((s(/usr/lib/python2.6/site-packages/cmd2.pyRos"                         *   "    *!   B       t HistoryItemcBs eZdZdZdZRS(s!-------------------------[%d] %s cCs)ti||i|_d|_dS(N(RRSRt lowercaseRR`(Rtinstr((s(/usr/lib/python2.6/site-packages/cmd2.pyRSs cCs|i|it|fS(N(t listformatR`R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRs(RRRRSR(((s(/usr/lib/python2.6/site-packages/cmd2.pyRs RcBsqeZdZdZdZdZeidZdZ eidZ dZ dZ d ed ZRS( spA list of HistoryItems that knows how to respond to user requests. >>> h = History([HistoryItem('first'), HistoryItem('second'), HistoryItem('third'), HistoryItem('fourth')]) >>> h.span('-2..') ['third', 'fourth'] >>> h.span('2..3') ['second', 'third'] >>> h.span('3') ['third'] >>> h.span(':') ['first', 'second', 'third', 'fourth'] >>> h.span('2..') ['second', 'third', 'fourth'] >>> h.span('-1') ['fourth'] >>> h.span('-2..-3') ['third', 'second'] >>> h.search('o') ['second', 'fourth'] >>> h.search('/IR/') ['first', 'third'] cCs%|}|djo|d8}n|S(Nii((RtonebasedR=((s(/usr/lib/python2.6/site-packages/cmd2.pytzero_based_index4s cCs*|o|it|}nd}|S(N(RR]R(RRR=((s(/usr/lib/python2.6/site-packages/cmd2.pytto_index9scCs|i}|d|djo djno$t|djo|dd!}nti|}ti|ti}g}|D]!}|i|o ||qq~S(Niit/i(RRRRRt IGNORECASER(RRR RR((s(/usr/lib/python2.6/site-packages/cmd2.pyR?s  9sJ^\s*(?P\-?\d+)?\s*(?P:|(\.{2,}))?\s*(?P\-?\d+)?\s*$cCs |id jo d}n|ii|}|p tn|idp||i|idgS|i|id}|i|id}t}|dj o2||jo||}}t}n|d7}n|||!}|o|i n|S( NRt-tallt:t separatorRtendi(RRsall( Rt spanpatternRR[RRRRRR(RRtresultsRRRR=((s(/usr/lib/python2.6/site-packages/cmd2.pyRHs&       s0^\s*(?P[\d]+)?\s*\-\s*(?P[\d]+)?\s*$cCs/t|}ti||t||_dS(N(RRHRJRR`(RRr((s(/usr/lib/python2.6/site-packages/cmd2.pyRJ^s cCs"x|D]}|i|qWdS(N(RJ(RRrtn((s(/usr/lib/python2.6/site-packages/cmd2.pytextendbsc sp|Sy9tdjo |d S|dgSWnNtj ogStj o/|ii}|oj|idpd}|idpd}|ot|d}n|ot|}n|||!SiidoMi do=t i dd!t i t i Bt iBfd}nfd}g}|D]}||o ||qoqo~SXdS(NiiiRRcs i|S(N(R(R(tfinder(s(/usr/lib/python2.6/site-packages/cmd2.pytisinscsi|ijS(N(RR(R(tgetme(s(/usr/lib/python2.6/site-packages/cmd2.pyRs(R]R[R^t rangePatternRRRRRtendswithRRtDOTALLt MULTILINER( RRtfromEndt rangeResultRRRRtitm((RRs(/usr/lib/python2.6/site-packages/cmd2.pyRfs2      *N(RRR RRRRRRRRRJRRRR(((s(/usr/lib/python2.6/site-packages/cmd2.pyRs      RrcBseZRS((RR(((s(/usr/lib/python2.6/site-packages/cmd2.pyRrsc Cst|}|tjoytt|SWnttfj onXy|i}WnnX|djp|dd jotS|djp|dd jotSny||SWnnXd||fGH|S( s=Tries to force a new value into the same type as the current.tonityRtoffRRs9Problem setting parameter (now %s) to %s; incorrect type?(RR(RR(ttypetboolR]R^R[RRR(tcurrentRrttyp((s(/usr/lib/python2.6/site-packages/cmd2.pyRps(   R1cBs#eZdZdZdZRS(cCs.||_||_|io|indS(N(R$tattribstsave(RR$R((s(/usr/lib/python2.6/site-packages/cmd2.pyRSs   cCs4x-|iD]"}t||t|i|q WdS(N(RRqR#R$(Rtattrib((s(/usr/lib/python2.6/site-packages/cmd2.pyRs cCsB|io4x1|iD]"}t|i|t||qWndS(N(R$RRqR#(RR((s(/usr/lib/python2.6/site-packages/cmd2.pyR:s  (RRRSRR:(((s(/usr/lib/python2.6/site-packages/cmd2.pyR1s  tBorgcBseZdZhZdZRS(scAll instances of any Borg subclass will share state. from Python Cookbook, 2nd Ed., recipe 6.16cOs%ti|||}|i|_|S(N(tobjectt__new__t _shared_statet__dict__(RRtkR$((s(/usr/lib/python2.6/site-packages/cmd2.pyRs (RRR RR(((s(/usr/lib/python2.6/site-packages/cmd2.pyRst OutputTrapcBs2eZdZdZdZdZdZRS(sInstantiate an OutputTrap to divert/capture ALL stdout output. For use in unit testing. Call `tearDown()` to return to normal output.cCs"d|_ti|_|t_dS(NRW(tcontentsRUR(t old_stdout(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRSs  cCs|i|7_dS(N(R(RR`((s(/usr/lib/python2.6/site-packages/cmd2.pyRmscCs|i}d|_|S(NRW(R(RR=((s(/usr/lib/python2.6/site-packages/cmd2.pyRgs  cCs|it_d|_dS(NRW(RRUR(R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyttearDowns (RRR RSRmRgR(((s(/usr/lib/python2.6/site-packages/cmd2.pyRs    Rc BseZdZdZdZdZdZei ddddde d e Z e i ei eieiZeid e eBZeid eieiBZd Zd ZRS(sSubclass this, setting CmdApp, to make a unittest.TestCase class that will execute the commands in a transcript file and expect the results shown. See example.pycCsh|_x]|iiD]O}xFti|D]5}t|}t|i|i|<|iq,WqWt|ipt dndS(Ns&No test files found - nothing to test.( t transcriptsRRtglobRtitert readlinesRnRt StandardError(RtfilesetRttfile((s(/usr/lib/python2.6/site-packages/cmd2.pytfetchTranscriptss   cCs7|io)t|_|i|_|indS(N(RRt outputTraptcmdappR(R((s(/usr/lib/python2.6/site-packages/cmd2.pytsetUps  cCsN|io@t|ii}x(|D]\}}|i||q&WndS(N(RRRRt_test_transcript(RtitsRt transcript((s(/usr/lib/python2.6/site-packages/cmd2.pytrunTests   t quoteCharRtescChars\t multilinetunquoteResultscCsti|dS(i(RR(R((s(/usr/lib/python2.6/site-packages/cmd2.pyRss\sc Csd}t}|i}|d7}d}xt|plxR|i|iip;y|i}Wntj ot}PnX|d7}q5W|t|iig}|i}x||i|iioe|i |t|iiy|i}Wn'tj otd|dfnX|d7}qWdi |}|ii |}|i i } |i|iio4d|||| f} |i| i | q+ng} x_|i|iipH| i |y|i}Wntj ot}PnX|d7}qWdi | } d|||| | f} |ii| } |iid| } |iid| } |iti| | titiB| q+WdS(NiisGTranscript broke off while reading command beginning at line %d with %sRWs> File %s, line %d Command was: %r Expected: (nothing) Got: %r s7 File %s, line %d Command was: %s Expected: %s Got: %s (RtnextRR RFt StopIterationRRR.RJRR,R Rgtassert_RtexpectationParserRt anyWhitespacetsubRRRR( RRRtlineNumtfinishedR*t tests_runRpRR=tmessagetexpected((s(/usr/lib/python2.6/site-packages/cmd2.pyR sh    cCs|io|iindS(N(RR R(R((s(/usr/lib/python2.6/site-packages/cmd2.pyR!s N(RRR RRRR RRKt QuotedStringRt regexPatternRRRt printablestnotRegexPatternRRRRRRRR R(((s(/usr/lib/python2.6/site-packages/cmd2.pyRs  $  9t__main__t optionflags(UR RRRRURR*R7tdoctestRR#RRRRVR{tcodeRRRRKt __version__t version_infot ParserElementt enablePackratRR"R&R1tValuesRRIRNR6RORct mswindowsRXR]RaRNRR5t check_callRR,tCalledProcessErrorR/RR t teststringR+RkRfRmRnR(RgRRtsetDefaultWhitespaceCharsRR6RwRvR|Rt SystemExitRRRRRRHRRrRpRR1RRtTestCaseRRttestmodtNORMALIZE_WHITESPACE(((s(/usr/lib/python2.6/site-packages/cmd2.pyts                   2     .     . ' '   2    i  [