/snap/core18/2979/usr/lib/python3.6/__pycache__
NameSizeModeActions
abc.cpython-36.pyc75150644editdlrm
aifc.cpython-36.pyc259430644editdlrm
antigravity.cpython-36.pyc7790644editdlrm
argparse.cpython-36.pyc604560644editdlrm
ast.cpython-36.pyc117040644editdlrm
asynchat.cpython-36.pyc68150644editdlrm
asyncore.cpython-36.pyc158380644editdlrm
base64.cpython-36.pyc170590644editdlrm
bdb.cpython-36.pyc170330644editdlrm
binhex.cpython-36.pyc120860644editdlrm
bisect.cpython-36.pyc26760644editdlrm
bz2.cpython-36.pyc112820644editdlrm
calendar.cpython-36.pyc258820644editdlrm
cgi.cpython-36.pyc284160644editdlrm
cgitb.cpython-36.pyc100800644editdlrm
chunk.cpython-36.pyc49000644editdlrm
cmd.cpython-36.pyc125750644editdlrm
code.cpython-36.pyc98360644editdlrm
codecs.cpython-36.pyc339000644editdlrm
codeop.cpython-36.pyc62700644editdlrm
colorsys.cpython-36.pyc33110644editdlrm
compileall.cpython-36.pyc82780644editdlrm
configparser.cpython-36.pyc452440644editdlrm
contextlib.cpython-36.pyc111580644editdlrm
copy.cpython-36.pyc70790644editdlrm
copyreg.cpython-36.pyc42440644editdlrm
cProfile.cpython-36.pyc42940644editdlrm
crypt.cpython-36.pyc22420644editdlrm
csv.cpython-36.pyc118550644editdlrm
datetime.cpython-36.pyc545110644editdlrm
decimal.cpython-36.pyc3510644editdlrm
difflib.cpython-36.pyc596420644editdlrm
dis.cpython-36.pyc141810644editdlrm
doctest.cpython-36.pyc755890644editdlrm
dummy_threading.cpython-36.pyc11020644editdlrm
enum.cpython-36.pyc234530644editdlrm
filecmp.cpython-36.pyc83050644editdlrm
fileinput.cpython-36.pyc131520644editdlrm
fnmatch.cpython-36.pyc28740644editdlrm
formatter.cpython-36.pyc175790644editdlrm
fractions.cpython-36.pyc184260644editdlrm
ftplib.cpython-36.pyc283570644editdlrm
functools.cpython-36.pyc240620644editdlrm
genericpath.cpython-36.pyc37260644editdlrm
getopt.cpython-36.pyc62170644editdlrm
getpass.cpython-36.pyc41770644editdlrm
gettext.cpython-36.pyc143060644editdlrm
glob.cpython-36.pyc42590644editdlrm
gzip.cpython-36.pyc162260644editdlrm
hashlib.cpython-36.pyc66920644editdlrm
heapq.cpython-36.pyc142920644editdlrm
hmac.cpython-36.pyc48360644editdlrm
imaplib.cpython-36.pyc421380644editdlrm
imghdr.cpython-36.pyc41500644editdlrm
imp.cpython-36.pyc96960644editdlrm
inspect.cpython-36.pyc797390644editdlrm
io.cpython-36.pyc33870644editdlrm
ipaddress.cpython-36.pyc623860644editdlrm
keyword.cpython-36.pyc17650644editdlrm
linecache.cpython-36.pyc37780644editdlrm
locale.cpython-36.pyc340300644editdlrm
lzma.cpython-36.pyc119920644editdlrm
macpath.cpython-36.pyc56410644editdlrm
macurl2path.cpython-36.pyc18670644editdlrm
mailbox.cpython-36.pyc637520644editdlrm
mailcap.cpython-36.pyc72090644editdlrm
mimetypes.cpython-36.pyc155530644editdlrm
modulefinder.cpython-36.pyc153660644editdlrm
netrc.cpython-36.pyc38360644editdlrm
nntplib.cpython-36.pyc337800644editdlrm
ntpath.cpython-36.pyc131900644editdlrm
nturl2path.cpython-36.pyc14990644editdlrm
numbers.cpython-36.pyc121420644editdlrm
opcode.cpython-36.pyc54130644editdlrm
operator.cpython-36.pyc139130644editdlrm
optparse.cpython-36.pyc480540644editdlrm
os.cpython-36.pyc296280644editdlrm
pathlib.cpython-36.pyc420070644editdlrm
pdb.cpython-36.pyc460940644editdlrm
pickle.cpython-36.pyc426910644editdlrm
pickletools.cpython-36.pyc660200644editdlrm
pipes.cpython-36.pyc78080644editdlrm
pkgutil.cpython-36.pyc162610644editdlrm
platform.cpython-36.pyc291970644editdlrm
plistlib.cpython-36.pyc280550644editdlrm
poplib.cpython-36.pyc133290644editdlrm
posixpath.cpython-36.pyc104560644editdlrm
pprint.cpython-36.pyc158240644editdlrm
profile.cpython-36.pyc139010644editdlrm
pstats.cpython-36.pyc218570644editdlrm
pty.cpython-36.pyc38610644editdlrm
pyclbr.cpython-36.pyc83650644editdlrm
pydoc.cpython-36.pyc837750644editdlrm
py_compile.cpython-36.pyc65440644editdlrm
queue.cpython-36.pyc87550644editdlrm
quopri.cpython-36.pyc57730644editdlrm
random.cpython-36.pyc193300644editdlrm
re.cpython-36.pyc140580644editdlrm
reprlib.cpython-36.pyc54000644editdlrm
rlcompleter.cpython-36.pyc57800644editdlrm
runpy.cpython-36.pyc79820644editdlrm
sched.cpython-36.pyc65640644editdlrm
secrets.cpython-36.pyc21620644editdlrm
selectors.cpython-36.pyc176970644editdlrm
shelve.cpython-36.pyc94580644editdlrm
shlex.cpython-36.pyc69700644editdlrm
shutil.cpython-36.pyc307040644editdlrm
signal.cpython-36.pyc25150644editdlrm
site.cpython-36.pyc165600644editdlrm
sitecustomize.cpython-36.pyc2120644editdlrm
smtpd.cpython-36.pyc266830644editdlrm
smtplib.cpython-36.pyc353400644editdlrm
sndhdr.cpython-36.pyc69130644editdlrm
socket.cpython-36.pyc220130644editdlrm
socketserver.cpython-36.pyc242500644editdlrm
sre_compile.cpython-36.pyc102780644editdlrm
sre_constants.cpython-36.pyc59720644editdlrm
sre_parse.cpython-36.pyc203580644editdlrm
ssl.cpython-36.pyc369390644editdlrm
stat.cpython-36.pyc38510644editdlrm
statistics.cpython-36.pyc181740644editdlrm
string.cpython-36.pyc79640644editdlrm
stringprep.cpython-36.pyc100300644editdlrm
struct.cpython-36.pyc3120644editdlrm
subprocess.cpython-36.pyc354850644editdlrm
sunau.cpython-36.pyc169380644editdlrm
symbol.cpython-36.pyc25170644editdlrm
symtable.cpython-36.pyc104280644editdlrm
sysconfig.cpython-36.pyc159160644editdlrm
tabnanny.cpython-36.pyc69750644editdlrm
tarfile.cpython-36.pyc630850644editdlrm
telnetlib.cpython-36.pyc180970644editdlrm
tempfile.cpython-36.pyc253090644editdlrm
textwrap.cpython-36.pyc136840644editdlrm
this.cpython-36.pyc12650644editdlrm
threading.cpython-36.pyc372340644editdlrm
timeit.cpython-36.pyc116030644editdlrm
token.cpython-36.pyc33200644editdlrm
tokenize.cpython-36.pyc186470644editdlrm
trace.cpython-36.pyc194950644editdlrm
traceback.cpython-36.pyc196460644editdlrm
tracemalloc.cpython-36.pyc172290644editdlrm
tty.cpython-36.pyc10720644editdlrm
turtle.cpython-36.pyc1317510644editdlrm
types.cpython-36.pyc82010644editdlrm
typing.cpython-36.pyc733060644editdlrm
uu.cpython-36.pyc34980644editdlrm
uuid.cpython-36.pyc209180644editdlrm
warnings.cpython-36.pyc132580644editdlrm
wave.cpython-36.pyc178850644editdlrm
weakref.cpython-36.pyc191430644editdlrm
webbrowser.cpython-36.pyc157970644editdlrm
xdrlib.cpython-36.pyc83020644editdlrm
zipapp.cpython-36.pyc55340644editdlrm
zipfile.cpython-36.pyc497280644editdlrm
_bootlocale.cpython-36.pyc9800644editdlrm
_collections_abc.cpython-36.pyc287970644editdlrm
_compat_pickle.cpython-36.pyc65660644editdlrm
_compression.cpython-36.pyc41040644editdlrm
_dummy_thread.cpython-36.pyc48510644editdlrm
_markupbase.cpython-36.pyc79910644editdlrm
_osx_support.cpython-36.pyc96840644editdlrm
_pydecimal.cpython-36.pyc1634020644editdlrm
_pyio.cpython-36.pyc713860644editdlrm
_sitebuiltins.cpython-36.pyc34350644editdlrm
_strptime.cpython-36.pyc159630644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc187790644editdlrm
_threading_local.cpython-36.pyc64250644editdlrm
_weakrefset.cpython-36.pyc78280644editdlrm
__future__.cpython-36.pyc41670644editdlrm
__phello__.foo.cpython-36.pyc1190644editdlrm
Edit: /snap/core18/2979/usr/lib/python3.6/__pycache__/cmd.cpython-36.pyc (12575B)
3 Nqi :@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@|dk r||_ntj|_|dk r(||_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.6/cmd.py__init__Ls z Cmd.__init__cCs|j|jr\|jr\y2ddl}|j|_|j|j|j|jdWnt k rZYnXz|dk rl||_ |j r|j j t |j dd}x|s6|jr|jjd}nl|jryt|j}Wntk rd}YnXn<|j j |j|j j|jj}t|s d}n |jd}|j|}|j|}|j||}qW|jWd|jr|jryddl}|j|jWnt k rYnXXdS)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 readlineZ get_completerZ old_completerZ set_completercompleteZparse_and_bind ImportErrorintror writestrr popinputpromptEOFErrorflushrlenrstripprecmdonecmdpostcmdpostloop)r rrstoplinerrrcmdloopbsN           z Cmd.cmdloopcCs|S)zHook method executed just before the command line is interpreted, but after the input prompt is generated and issued. r)r r'rrrr"sz Cmd.precmdcCs|S)z?Hook method executed just after a command dispatch is finished.r)r r&r'rrrr$sz Cmd.postcmdcCsdS)z>Hook method executed once when the cmdloop() method is called.Nr)r rrrrsz Cmd.preloopcCsdS)zYHook method executed once when the cmdloop() method is about to return. Nr)r rrrr%sz Cmd.postloopcCs|j}|sdd|fS|ddkr4d|dd}n2|ddkrft|dr\d|dd}n dd|fSdt|}}x"||kr|||jkr|d}qvW|d|||dj}}|||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!Zdo_shellzshell )striphasattrr identchars)r r'incmdargrrr parselines      z Cmd.parselinec Cs|j|\}}}|s|jS|dkr.|j|S||_|dkrBd|_|dkrT|j|Syt|d|}Wntk r|j|SX||SdS)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_)r2 emptylinedefaultlastcmdgetattrAttributeError)r r'r0r1funcrrrr#s    z Cmd.onecmdcCs|jr|j|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)r6r#)r rrrr4sz Cmd.emptylinecCs|jjd|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 r)r r'rrrr5sz 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|jDS)Nr3cs"g|]}|jr|ddqS)N) startswith).0a)dotextrr sz%Cmd.completenames..) get_names)r textr:r)r@r completenamesszCmd.completenamesc Cs|dkrddl}|j}|j}t|t|}|j|}|j|}|dkr|j|\} } } | dkrp|j} qyt|d| } Wqt k r|j} YqXn|j } | |||||_ y |j |St k rdSXdS)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. rNrZ complete_) rZget_line_bufferlstripr Z get_begidxZ get_endidxr2r;r7r8rDZcompletion_matches IndexError) r rCstaterZorigliner'strippedZbegidxZendidxr0argsZfooZcompfuncrrrrs*   z Cmd.completecCs t|jS)N)dir __class__)r rrrrBsz Cmd.get_namescs4t|j}tfdd|jD}t||BS)Nc3s,|]$}|jddr|ddVqdS)help_rN)r=)r>r?)rIrr sz$Cmd.complete_help..)setrDrBlist)r rIZcommandsZtopicsr)rIr complete_helpszCmd.complete_helpc Cs|ryt|d|}Wnvtk ry0t|d|j}|rT|jjdt|dSWntk rjYnX|jjdt|j|fdSX|n|j}g}g}i}x,|D]$}|dddkrd||dd<qW|jd} xx|D]p}|dddkr|| kr q|} |dd} | |kr8|j | || =qt||jrR|j | q|j | qW|jjdt|j |j |j |d d |j |j t|jd d |j |j|d d dS) zEList available commands with "help" or detailed help with "help cmd".rLr3z%s NrMrrr<P)r7r8__doc__r rrnohelprBsortappend doc_leader print_topics doc_header misc_headerrPkeys undoc_header) r r1r9docnamesZcmds_docZ cmds_undochelpnameZprevnamer0rrrdo_help$sN        z Cmd.do_helpcCs\|rX|jjdt||jr<|jjdt|jt||j||d|jjddS)Nz%s rr)r rrrulerr columnize)r headerZcmdsZcmdlenZmaxcolrrrrYRs zCmd.print_topicsrScss|jjddSfddttD}|rJtddjtt|t}|dkrv|jjdtd dSxtdtD]}||d|}g}d }xrt|D]f} d } x Ncsg|]}t|ts|qSr) isinstancer)r>r.)rPrrrAdsz!Cmd.columnize..z list[i] not a string for i in %sz, rz%s rrz ri) r rranger TypeErrorjoinmaprmaxrWljust)r rPZ displaywidthZ nonstringssizeZnrowsZncolsZ colwidthsZtotwidthcolZcolwidthrowr.xZtextsr)rPrrdZsZ       z Cmd.columnize)rNN)N)rS)#__name__ __module__ __qualname__rTPROMPTr IDENTCHARSr-rcr6rrXrZr[r]rUrrr(r"r$rr%r2r#r4r5r;rDrrBrQrbrYrdrrrrr4s<   4   .) rTstringr __all__rwZ ascii_lettersZdigitsrxrrrrr+s