/snap/core18/2999/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/2999/usr/lib/python3.6/__pycache__/selectors.cpython-36.pyc (17697B)
3 NqiK@sdZddlmZmZddlmZmZddlZddlZddl Z d)Z d*Z ddZ edd d d d gZ d e _e jd+krde j_de j_de j_de j_GdddeZGdddedZGdddeZGdddeZeedrGdddeZeed rGd!d"d"eZeed#r"Gd$d%d%eZeed&r>Gd'd(d(eZd(ekrPeZn:d"ekrbeZn(d%ekrteZndekreZneZdS),z|Selectors module. This module allows high-level and efficient I/O multiplexing, built upon the `select` module primitives. )ABCMetaabstractmethod) namedtupleMappingNc Csft|tr|}nsz_SelectorMapping.__init__cCs t|jjS)N)lenr _fd_to_key)rrrr__len__Asz_SelectorMapping.__len__c CsBy|jj|}|jj|Stk r<tdj|dYnXdS)Nz{!r} is not registered)r_fileobj_lookuprKeyErrorr )rrrrrr __getitem__Ds   z_SelectorMapping.__getitem__cCs t|jjS)N)iterrr)rrrr__iter__Ksz_SelectorMapping.__iter__N)__name__ __module__ __qualname____doc__rrr!r#rrrrr;s rc@sneZdZdZedddZeddZdddZedd d Zd d Z d dZ eddZ ddZ ddZ dS) BaseSelectora-Selector abstract base class. A selector supports registering file objects to be monitored for specific I/O events. A file object is a file descriptor or any object with a `fileno()` method. An arbitrary object can be attached to the file object, which can be used for example to store context information, a callback, etc. A selector can use various implementations (select(), poll(), epoll()...) depending on the platform. The default `Selector` class uses the most efficient implementation on the current platform. NcCstdS)a3Register a file object. Parameters: fileobj -- file object or file descriptor events -- events to monitor (bitwise mask of EVENT_READ|EVENT_WRITE) data -- attached data Returns: SelectorKey instance Raises: ValueError if events is invalid KeyError if fileobj is already registered OSError if fileobj is closed or otherwise is unacceptable to the underlying system call (if a system call is made) Note: OSError may or may not be raised N)NotImplementedError)rrrrrrrregister^szBaseSelector.registercCstdS)ajUnregister a file object. Parameters: fileobj -- file object or file descriptor Returns: SelectorKey instance Raises: KeyError if fileobj is not registered Note: If fileobj is registered but has since been closed this does *not* raise OSError (even if the wrapped syscall does) N)r))rrrrr unregisteruszBaseSelector.unregistercCs|j||j|||S)ayChange a registered file object monitored events or attached data. Parameters: fileobj -- file object or file descriptor events -- events to monitor (bitwise mask of EVENT_READ|EVENT_WRITE) data -- attached data Returns: SelectorKey instance Raises: Anything that unregister() or register() raises )r+r*)rrrrrrrmodifys zBaseSelector.modifycCstdS)aqPerform the actual selection, until some monitored file objects are ready or a timeout expires. Parameters: timeout -- if timeout > 0, this specifies the maximum wait time, in seconds if timeout <= 0, the select() call won't block, and will report the currently ready file objects if timeout is None, select() will block until a monitored file object becomes ready Returns: list of (key, events) for ready file objects `events` is a bitwise mask of EVENT_READ|EVENT_WRITE N)r))rtimeoutrrrselectszBaseSelector.selectcCsdS)zmClose the selector. This must be called to make sure that any underlying resource is freed. Nr)rrrrcloseszBaseSelector.closec CsJ|j}|dkrtdy||Stk rDtdj|dYnXdS)zzReturn the key associated to a registered file object. Returns: SelectorKey for this file object NzSelector is closedz{!r} is not registered)get_map RuntimeErrorr r )rrmappingrrrget_keyszBaseSelector.get_keycCstdS)z2Return a mapping of file objects to selector keys.N)r))rrrrr0szBaseSelector.get_mapcCs|S)Nr)rrrr __enter__szBaseSelector.__enter__cGs |jdS)N)r/)rargsrrr__exit__szBaseSelector.__exit__)N)N)N)r$r%r&r'rr*r+r,r.r/r3r0r4r6rrrrr(Os      r() metaclassc@sTeZdZdZddZddZdddZd d Zdd d Zd dZ ddZ ddZ dS)_BaseSelectorImplzBase selector implementation.cCsi|_t||_dS)N)rr_map)rrrrrsz_BaseSelectorImpl.__init__c CsHyt|Stk rBx"|jjD]}|j|kr$|jSq$WYnXdS)alReturn a file descriptor from a file object. This wraps _fileobj_to_fd() to do an exhaustive search in case the object is invalid but we still have it in our map. This is used by unregister() so we can unregister an object that was previously registered even if it is closed. It is also used by _SelectorMapping. N)rr rvaluesrr)rrkeyrrrrs   z!_BaseSelectorImpl._fileobj_lookupNcCsd| s|ttB@r"tdj|t||j|||}|j|jkrTtdj||j||j|j<|S)NzInvalid events: {!r}z"{!r} (FD {}) is already registered) EVENT_READ EVENT_WRITEr r rrrrr )rrrrr;rrrr*s   z_BaseSelectorImpl.registerc Cs@y|jj|j|}Wn$tk r:tdj|dYnX|S)Nz{!r} is not registered)rpoprr r )rrr;rrrr+s z_BaseSelectorImpl.unregisterc Csy|j|j|}Wn$tk r8tdj|dYnX||jkr^|j||j|||}n"||jkr|j|d}||j|j <|S)Nz{!r} is not registered)r) rrr r rr+r*r_replacer)rrrrr;rrrr,s     z_BaseSelectorImpl.modifycCs|jjd|_dS)N)rclearr9)rrrrr/ s z_BaseSelectorImpl.closecCs|jS)N)r9)rrrrr0sz_BaseSelectorImpl.get_mapc Cs$y |j|Stk rdSXdS)zReturn the key associated to a given file descriptor. Parameters: fd -- file descriptor Returns: corresponding key, or None if not found N)rr )rrrrr _key_from_fds  z_BaseSelectorImpl._key_from_fd)N)N) r$r%r&r'rrr*r+r,r/r0rArrrrr8s  r8cs`eZdZdZfddZdfdd ZfddZejd krHdd d Z ne j Z dd d Z Z S)SelectSelectorzSelect-based selector.cstjt|_t|_dS)N)superrset_readers_writers)r) __class__rrr%s zSelectSelector.__init__Ncs@tj|||}|t@r&|jj|j|t@r<|jj|j|S)N)rCr*r<rEaddrr=rF)rrrrr;)rGrrr**s zSelectSelector.registercs,tj|}|jj|j|jj|j|S)N)rCr+rEdiscardrrF)rrr;)rGrrr+2s zSelectSelector.unregisterZwin32cCs$tj||||\}}}|||gfS)N)r.)rrw_r-xrrr_select9szSelectSelector._selectc Cs|dkr dnt|d}g}y|j|j|jg|\}}}Wntk rL|SXt|}t|}xV||BD]J}d}||kr|tO}||kr|tO}|j|}|rh|j |||j @fqhW|S)Nr) maxrNrErFInterruptedErrorrDr<r=rAappendr) rr-readyrJrKrLrrr;rrrr.?s$ zSelectSelector.select)N)N)N) r$r%r&r'rr*r+sysplatformrNr. __classcell__rr)rGrrB"s    rBpollcsDeZdZdZfddZd fdd ZfddZd d d ZZS) PollSelectorzPoll-based selector.cstjtj|_dS)N)rCrr.rV_poll)r)rGrrrZs zPollSelector.__init__NcsLtj|||}d}|t@r&|tjO}|t@r8|tjO}|jj|j||S)Nr) rCr*r<r.POLLINr=POLLOUTrXr)rrrrr; poll_events)rGrrr*^s  zPollSelector.registercstj|}|jj|j|S)N)rCr+rXr)rrr;)rGrrr+hs zPollSelector.unregisterc Cs|dkrd}n|dkrd}ntj|d}g}y|jj|}Wntk rR|SXx^|D]V\}}d}|tj@rz|tO}|tj@r|t O}|j |}|rZ|j |||j @fqZW|S)Nrg@@) mathceilrXrVrPr.rYr=rZr<rArQr)rr-rR fd_event_listreventrr;rrrr.ms(   zPollSelector.select)N)N) r$r%r&r'rr*r+r.rUrr)rGrrWWs   rWepollcsXeZdZdZfddZddZdfdd Zfd d Zdd d Zfd dZ Z S) EpollSelectorzEpoll-based selector.cstjtj|_dS)N)rCrr.r`_epoll)r)rGrrrs zEpollSelector.__init__cCs |jjS)N)rbr )rrrrr szEpollSelector.filenoNc sttj|||}d}|t@r&|tjO}|t@r8|tjO}y|jj|j|Wn"t k rntj |YnX|S)Nr) rCr*r<r.EPOLLINr=EPOLLOUTrbr BaseExceptionr+)rrrrr;Z epoll_events)rGrrr*s   zEpollSelector.registerc s8tj|}y|jj|jWntk r2YnX|S)N)rCr+rbrOSError)rrr;)rGrrr+s  zEpollSelector.unregisterc Cs|dkrd}n |dkrd}ntj|dd}tt|jd}g}y|jj||}Wntk rh|SXx^|D]V\}}d}|tj @r|t O}|tj @r|t O}|j |}|rp|j|||j@fqpW|S)Nrrg@@gMbP?)r\r]rOrrrbrVrPr.rcr=rdr<rArQr) rr-max_evrRr^rr_rr;rrrr.s*   zEpollSelector.selectcs|jjtjdS)N)rbr/rC)r)rGrrr/s zEpollSelector.close)N)N) r$r%r&r'rr r*r+r.r/rUrr)rGrras  radevpollcsXeZdZdZfddZddZdfdd Zfd d Zdd d Zfd dZ Z S)DevpollSelectorzSolaris /dev/poll selector.cstjtj|_dS)N)rCrr.ri_devpoll)r)rGrrrs zDevpollSelector.__init__cCs |jjS)N)rkr )rrrrr szDevpollSelector.filenoNcsLtj|||}d}|t@r&|tjO}|t@r8|tjO}|jj|j||S)Nr) rCr*r<r.rYr=rZrkr)rrrrr;r[)rGrrr*s  zDevpollSelector.registercstj|}|jj|j|S)N)rCr+rkr)rrr;)rGrrr+s zDevpollSelector.unregisterc Cs|dkrd}n|dkrd}ntj|d}g}y|jj|}Wntk rR|SXx^|D]V\}}d}|tj@rz|tO}|tj@r|t O}|j |}|rZ|j |||j @fqZW|S)Nrg@@) r\r]rkrVrPr.rYr=rZr<rArQr)rr-rRr^rr_rr;rrrr.s(   zDevpollSelector.selectcs|jjtjdS)N)rkr/rC)r)rGrrr/s zDevpollSelector.close)N)N) r$r%r&r'rr r*r+r.r/rUrr)rGrrjs   rjkqueuecsXeZdZdZfddZddZdfdd Zfd d Zdd d Zfd dZ Z S)KqueueSelectorzKqueue-based selector.cstjtj|_dS)N)rCrr.rl_kqueue)r)rGrrrs zKqueueSelector.__init__cCs |jjS)N)rnr )rrrrr szKqueueSelector.filenoNc stj|||}y`|t@r@tj|jtjtj}|jj |gdd|t @rntj|jtj tj}|jj |gddWn"t k rtj |YnX|S)Nr)rCr*r<r.keventrKQ_FILTER_READZ KQ_EV_ADDrncontrolr=KQ_FILTER_WRITErer+)rrrrr;kev)rGrrr*s   zKqueueSelector.registercstj|}|jt@rVtj|jtjtj}y|j j |gddWnt k rTYnX|jt @rtj|jtj tj}y|j j |gddWnt k rYnX|S)Nr)rCr+rr<r.rorrpZ KQ_EV_DELETErnrqrfr=rr)rrr;rs)rGrrr+'s      zKqueueSelector.unregisterc Cs|dkr dnt|d}t|j}g}y|jjd||}Wntk rL|SXxb|D]Z}|j}|j}d}|tj krz|t O}|tj kr|t O}|j |} | rT|j| || j@fqTW|S)Nr)rOrrrnrqrPZidentfilterr.rpr<rrr=rArQr) rr-rhrRZkev_listrsrflagrr;rrrr.<s&     zKqueueSelector.selectcs|jjtjdS)N)rnr/rC)r)rGrrr/Rs zKqueueSelector.close)N)N) r$r%r&r'rr r*r+r.r/rUrr)rGrrm s   rmr)rr)r'abcrr collectionsrrr\r.rSr<r=rr version_inforrrrrr(r8rBhasattrrWrarjrmglobalsZDefaultSelectorrrrrsH ~U3 1 G 8 M