/snap/core22/2437/usr/lib/python3.10/__pycache__
NameSizeModeActions
abc.cpython-310.pyc67510644editdlrm
aifc.cpython-310.pyc246850644editdlrm
antigravity.cpython-310.pyc8220644editdlrm
argparse.cpython-310.pyc635390644editdlrm
ast.cpython-310.pyc557390644editdlrm
asynchat.cpython-310.pyc70250644editdlrm
asyncore.cpython-310.pyc160020644editdlrm
base64.cpython-310.pyc171620644editdlrm
bdb.cpython-310.pyc258320644editdlrm
binhex.cpython-310.pyc128700644editdlrm
bisect.cpython-310.pyc25880644editdlrm
bz2.cpython-310.pyc108700644editdlrm
calendar.cpython-310.pyc263030644editdlrm
cgi.cpython-310.pyc267230644editdlrm
cgitb.cpython-310.pyc99980644editdlrm
chunk.cpython-310.pyc48600644editdlrm
cmd.cpython-310.pyc127070644editdlrm
code.cpython-310.pyc99570644editdlrm
codecs.cpython-310.pyc332190644editdlrm
codeop.cpython-310.pyc55950644editdlrm
colorsys.cpython-310.pyc32650644editdlrm
compileall.cpython-310.pyc127330644editdlrm
configparser.cpython-310.pyc454580644editdlrm
contextlib.cpython-310.pyc208950644editdlrm
contextvars.cpython-310.pyc2460644editdlrm
copy.cpython-310.pyc69960644editdlrm
copyreg.cpython-310.pyc46830644editdlrm
cProfile.cpython-310.pyc51130644editdlrm
crypt.cpython-310.pyc35500644editdlrm
csv.cpython-310.pyc117980644editdlrm
dataclasses.cpython-310.pyc265780644editdlrm
datetime.cpython-310.pyc565330644editdlrm
decimal.cpython-310.pyc3620644editdlrm
difflib.cpython-310.pyc589050644editdlrm
dis.cpython-310.pyc156560644editdlrm
doctest.cpython-310.pyc761750644editdlrm
enum.cpython-310.pyc260630644editdlrm
filecmp.cpython-310.pyc87490644editdlrm
fileinput.cpython-310.pyc140720644editdlrm
fnmatch.cpython-310.pyc42440644editdlrm
fractions.cpython-310.pyc186000644editdlrm
ftplib.cpython-310.pyc289770644editdlrm
functools.cpython-310.pyc283350644editdlrm
genericpath.cpython-310.pyc39070644editdlrm
getopt.cpython-310.pyc63390644editdlrm
getpass.cpython-310.pyc42100644editdlrm
gettext.cpython-310.pyc182210644editdlrm
glob.cpython-310.pyc58520644editdlrm
graphlib.cpython-310.pyc76160644editdlrm
gzip.cpython-310.pyc185460644editdlrm
hashlib.cpython-310.pyc68450644editdlrm
heapq.cpython-310.pyc138650644editdlrm
hmac.cpython-310.pyc69730644editdlrm
imaplib.cpython-310.pyc423120644editdlrm
imghdr.cpython-310.pyc39050644editdlrm
imp.cpython-310.pyc97860644editdlrm
inspect.cpython-310.pyc851530644editdlrm
io.cpython-310.pyc36630644editdlrm
ipaddress.cpython-310.pyc626700644editdlrm
keyword.cpython-310.pyc9270644editdlrm
linecache.cpython-310.pyc41420644editdlrm
locale.cpython-310.pyc461540644editdlrm
lzma.cpython-310.pyc121000644editdlrm
mailbox.cpython-310.pyc600910644editdlrm
mailcap.cpython-310.pyc73200644editdlrm
mimetypes.cpython-310.pyc176190644editdlrm
modulefinder.cpython-310.pyc161660644editdlrm
netrc.cpython-310.pyc39330644editdlrm
nntplib.cpython-310.pyc316230644editdlrm
ntpath.cpython-310.pyc147040644editdlrm
nturl2path.cpython-310.pyc17470644editdlrm
numbers.cpython-310.pyc118660644editdlrm
opcode.cpython-310.pyc54470644editdlrm
operator.cpython-310.pyc135080644editdlrm
optparse.cpython-310.pyc477540644editdlrm
os.cpython-310.pyc315990644editdlrm
pathlib.cpython-310.pyc420520644editdlrm
pdb.cpython-310.pyc474400644editdlrm
pickle.cpython-310.pyc468820644editdlrm
pickletools.cpython-310.pyc677600644editdlrm
pipes.cpython-310.pyc77690644editdlrm
pkgutil.cpython-310.pyc183610644editdlrm
platform.cpython-310.pyc274290644editdlrm
plistlib.cpython-310.pyc237650644editdlrm
poplib.cpython-310.pyc135730644editdlrm
posixpath.cpython-310.pyc105600644editdlrm
pprint.cpython-310.pyc178750644editdlrm
profile.cpython-310.pyc143910644editdlrm
pstats.cpython-310.pyc236210644editdlrm
pty.cpython-310.pyc41430644editdlrm
pyclbr.cpython-310.pyc97750644editdlrm
pydoc.cpython-310.pyc856450644editdlrm
py_compile.cpython-310.pyc73390644editdlrm
queue.cpython-310.pyc107920644editdlrm
quopri.cpython-310.pyc57940644editdlrm
random.cpython-310.pyc227480644editdlrm
re.cpython-310.pyc142270644editdlrm
reprlib.cpython-310.pyc52500644editdlrm
rlcompleter.cpython-310.pyc59540644editdlrm
runpy.cpython-310.pyc94110644editdlrm
sched.cpython-310.pyc61150644editdlrm
secrets.cpython-310.pyc21750644editdlrm
selectors.cpython-310.pyc171050644editdlrm
shelve.cpython-310.pyc94920644editdlrm
shlex.cpython-310.pyc77820644editdlrm
shutil.cpython-310.pyc385360644editdlrm
signal.cpython-310.pyc29350644editdlrm
site.cpython-310.pyc179220644editdlrm
sitecustomize.cpython-310.pyc2250644editdlrm
smtpd.cpython-310.pyc261470644editdlrm
smtplib.cpython-310.pyc357660644editdlrm
sndhdr.cpython-310.pyc69620644editdlrm
socket.cpython-310.pyc289630644editdlrm
socketserver.cpython-310.pyc253470644editdlrm
sre_compile.cpython-310.pyc151940644editdlrm
sre_constants.cpython-310.pyc63570644editdlrm
sre_parse.cpython-310.pyc217550644editdlrm
ssl.cpython-310.pyc452710644editdlrm
stat.cpython-310.pyc42730644editdlrm
statistics.cpython-310.pyc370510644editdlrm
string.cpython-310.pyc71020644editdlrm
stringprep.cpython-310.pyc170750644editdlrm
struct.cpython-310.pyc3070644editdlrm
subprocess.cpython-310.pyc447410644editdlrm
sunau.cpython-310.pyc164820644editdlrm
symtable.cpython-310.pyc128350644editdlrm
sysconfig.cpython-310.pyc181510644editdlrm
tabnanny.cpython-310.pyc69500644editdlrm
tarfile.cpython-310.pyc706740644editdlrm
telnetlib.cpython-310.pyc185060644editdlrm
tempfile.cpython-310.pyc273390644editdlrm
textwrap.cpython-310.pyc138120644editdlrm
this.cpython-310.pyc12640644editdlrm
threading.cpython-310.pyc449690644editdlrm
timeit.cpython-310.pyc117690644editdlrm
token.cpython-310.pyc27380644editdlrm
tokenize.cpython-310.pyc171940644editdlrm
trace.cpython-310.pyc198700644editdlrm
traceback.cpython-310.pyc217120644editdlrm
tracemalloc.cpython-310.pyc175250644editdlrm
tty.cpython-310.pyc10790644editdlrm
turtle.cpython-310.pyc1288570644editdlrm
types.cpython-310.pyc95250644editdlrm
typing.cpython-310.pyc852770644editdlrm
uu.cpython-310.pyc38670644editdlrm
uuid.cpython-310.pyc224980644editdlrm
warnings.cpython-310.pyc136460644editdlrm
wave.cpython-310.pyc175940644editdlrm
weakref.cpython-310.pyc203430644editdlrm
webbrowser.cpython-310.pyc170000644editdlrm
xdrlib.cpython-310.pyc78800644editdlrm
zipapp.cpython-310.pyc60130644editdlrm
zipfile.cpython-310.pyc618450644editdlrm
zipimport.cpython-310.pyc170330644editdlrm
_aix_support.cpython-310.pyc28790644editdlrm
_bootsubprocess.cpython-310.pyc22940644editdlrm
_collections_abc.cpython-310.pyc329250644editdlrm
_compat_pickle.cpython-310.pyc58720644editdlrm
_compression.cpython-310.pyc45120644editdlrm
_distutils_system_mod.cpython-310.pyc54220644editdlrm
_markupbase.cpython-310.pyc75720644editdlrm
_osx_support.cpython-310.pyc115350644editdlrm
_pydecimal.cpython-310.pyc1577360644editdlrm
_pyio.cpython-310.pyc736540644editdlrm
_py_abc.cpython-310.pyc46830644editdlrm
_sitebuiltins.cpython-310.pyc35470644editdlrm
_strptime.cpython-310.pyc159450644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc353850644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-310.pyc353790644editdlrm
_threading_local.cpython-310.pyc65390644editdlrm
_weakrefset.cpython-310.pyc76080644editdlrm
__future__.cpython-310.pyc41310644editdlrm
__phello__.foo.cpython-310.pyc1300644editdlrm
Edit: /snap/core22/2437/usr/lib/python3.10/__pycache__/cmd.cpython-310.pyc (12707B)
o p̦i :@s@dZddlZddlZdgZdZejejdZGdddZdS)a A generic class to build line-oriented command interpreters. Interpreters constructed with this class obey the following conventions: 1. End of file on input is processed as the command 'EOF'. 2. A command is parsed out of each line by collecting the prefix composed of characters in the identchars member. 3. A command `foo' is dispatched to a method 'do_foo()'; the do_ method is passed a single argument consisting of the remainder of the line. 4. Typing an empty line repeats the last command. (Actually, it calls the method `emptyline', which may be overridden in a subclass.) 5. There is a predefined `help' method. Given an argument `topic', it calls the command `help_topic'. With no arguments, it lists all topics with defined help_ functions, broken into up to three topics; documented commands, miscellaneous help topics, and undocumented commands. 6. The command '?' is a synonym for `help'. The command '!' is a synonym for `shell', if a do_shell method exists. 7. If completion is enabled, completing commands will be done automatically, and completing of commands args is done by calling complete_foo() with arguments text, line, begidx, endidx. text is string we are matching against, all returned matches must begin with it. line is the current input line (lstripped), begidx and endidx are the beginning and end indexes of the text being matched, which could be used to provide different completion depending upon which position the argument is in. The `default' method may be overridden to intercept commands for which there is no do_ method. The `completedefault' method may be overridden to intercept completions for commands that have no complete_ method. The data member `self.ruler' sets the character used to draw separator lines in the help messages. If empty, no ruler line is drawn. It defaults to "=". If the value of `self.intro' is nonempty when the cmdloop method is called, it is printed out on interpreter startup. This value may be overridden via an optional argument to the cmdloop() method. The data members `self.doc_header', `self.misc_header', and `self.undoc_header' set the headers used for the help function's listings of documented functions, miscellaneous topics, and undocumented functions respectively. NCmdz(Cmd) _c@seZdZdZeZeZdZdZ dZ dZ dZ dZ dZdZd Zd0d d Zd1d dZddZddZddZddZddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Z d+d,Z!d2d.d/Z"dS)3raA simple framework for writing line-oriented command interpreters. These are often useful for test harnesses, administrative tools, and prototypes that will later be wrapped in a more sophisticated interface. A Cmd instance or subclass instance is a line-oriented interpreter framework. There is no good reason to instantiate Cmd itself; rather, it's useful as a superclass of an interpreter class you define yourself in order to inherit Cmd's methods and encapsulate action methods. =Nz(Documented commands (type help ):zMiscellaneous help topics:zUndocumented commands:z*** No help on %stabcCs@|dur||_ntj|_|dur||_ntj|_g|_||_dS)aInstantiate a line-oriented interpreter framework. The optional argument 'completekey' is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, sys.stdin and sys.stdout are used. N)stdinsysstdoutcmdqueue completekey)selfr rr r/usr/lib/python3.10/cmd.py__init__Ls  z Cmd.__init__cCs||jr-|jr-zddl}||_||j||jdWn t y,Ynwz|dur5||_ |j rC|j t |j dd}|s|jrQ|jd}n3|jrgzt|j}Wn(tyfd}Ynw|j |j|j |j}t|sd}n|d}||}||}|||}|rG|W|jr|jrz ddl}||jWdSt yYdSwdSdS|jr|jrz ddl}||jWwt yYwwww)zRepeatedly 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. rNz : complete EOFz )preloop use_rawinputr readline get_completer old_completer set_completercompleteparse_and_bind ImportErrorintror writestrr popinputpromptEOFErrorflushrlenrstripprecmdonecmdpostcmdpostloop)r rrstoplinerrrcmdloopbsf               z Cmd.cmdloopcC|S)zHook method executed just before the command line is interpreted, but after the input prompt is generated and issued. rr r+rrrr&z Cmd.precmdcCr-)z?Hook method executed just after a command dispatch is finished.r)r r*r+rrrr(z Cmd.postcmdcCdS)z>Hook method executed once when the cmdloop() method is called.Nrr rrrrr0z Cmd.preloopcCr1)zYHook method executed once when the cmdloop() method is about to return. Nrr2rrrr)r/z Cmd.postloopcCs|}|s dd|fS|ddkrd|dd}n|ddkr3t|dr.d|dd}ndd|fSdt|}}||krT|||jvrT|d}||krT|||jvsE|d|||d}}|||fS) zParse the line into a command name and a string containing the arguments. Returns a tuple containing (command, args, line). 'command' and 'args' may be None if the line couldn't be parsed. Nr?zhelp r!do_shellzshell )striphasattrr$ identchars)r r+incmdargrrr parselines     4 z Cmd.parselinecCs||\}}}|s|S|dur||S||_|dkr!d|_|dkr*||Sz t|d|}W||StyD||YSw)ahInterpret 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. Nrrdo_)r= emptylinedefaultlastcmdgetattrAttributeError)r r+r;r<funcrrrr's     z Cmd.onecmdcCs|jr ||jSdS)zCalled when an empty line is entered in response to the prompt. If this method is not overridden, it repeats the last nonempty command entered. N)rAr'r2rrrr?s z Cmd.emptylinecCs|jd|dS)zCalled on an input line when the command prefix is not recognized. If this method is not overridden, it prints an error message and returns. z*** Unknown syntax: %s N)r rr.rrrr@sz Cmd.defaultcGsgS)zMethod called to complete an input line when no command-specific complete_*() method is available. By default, it returns an empty list. r)r ignoredrrrcompletedefaultszCmd.completedefaultcsd|fdd|DS)Nr>cs"g|] }|r|ddqS)N startswith.0adotextrr s"z%Cmd.completenames..) get_names)r textrErrMr completenamesszCmd.completenamesc Cs|dkrYddl}|}|}t|t|}||}||}|dkrN||\} } } | dkr8|j} nz t|d| } Wnt yM|j} Ynw|j } | |||||_ z|j |WSt yiYdSw)zReturn the next possible completion for 'text'. If a command has not been entered, then complete against command list. Otherwise try to call complete_ to get list of completions. rNr complete_) rget_line_bufferlstripr$ get_begidx get_endidxr=rFrBrCrRcompletion_matches IndexError) r rQstaterorigliner+strippedbegidxendidxr;argsfoocompfuncrrrrs.      z Cmd.completecCs t|jSN)dir __class__r2rrrrPs z Cmd.get_namescs4t|j}tfdd|D}t||BS)Nc3s.|]}|ddr|ddVqdS)help_rNrHrJr_rr sz$Cmd.complete_help..)setrRrPlist)r r_commandstopicsrrgr complete_helps zCmd.complete_helpc Cs|rMz t|d|}Wn<tyGzt|d|j}|r+|jdt|WYdSWn ty5Ynw|jdt|j|fYdSw|dS|}g}g}i}|D]}|dddkrkd||dd<qY|d} |D]5}|dddkr|| krqt|} |dd} | |vr| | || =qtt||jr| | qt| | qt|jdt|j | |j |d d | |j t|d d | |j|d d dS) zEList available commands with "help" or detailed help with "help cmd".rer>%s NrfrrrGP)rBrC__doc__r rrnohelprPsortappend doc_leader print_topics doc_header misc_headerrjkeys undoc_header) r r<rDdocnamescmds_doc cmds_undochelpnameprevnamer;rrrdo_help$sX        z Cmd.do_helpcCs`|r.|jdt||jr|jdt|jt||||d|jddSdS)Nrnrr)r rrrulerr$ columnize)r headercmdscmdlenmaxcolrrrrvRszCmd.print_topicsrpcss |jddSfddttD}|r%tddtt|t}|dkr;|jdtd dStdtD]L}||d|}g}d }t|D]3} d } t|D]} | || } | |krjn | } t| t| } q\| | || d 7}||krnqT||krn qBt}d}d g}t|D]Q} g}t|D]} | || } | |krd } n| } | | q|r|d s|d =|r|d rtt|D] } ||  || || <q|jdtd|qdS)zDisplay a list of strings as a compact set of columns. Each column is only as wide as necessary. Columns are separated by two spaces (one was not legible enough). z Ncsg|] }t|ts|qSr) isinstancer)rKr9rjrrrOds  z!Cmd.columnize..z list[i] not a string for i in %sz, rrnrrz ) r rranger$ TypeErrorjoinmaprmaxrtljust)r rj displaywidth nonstringssizenrowsncols colwidthstotwidthcolcolwidthrowr9xtextsrrrrZsd            z Cmd.columnize)rNNrb)rp)#__name__ __module__ __qualname__rqPROMPTr! IDENTCHARSr8rrArrurwrxrzrrrrr,r&r(rr)r=r'r?r@rFrRrrPrmrrvrrrrrr4s>   4   .) rqstringr __all__r ascii_lettersdigitsrrrrrrs ,