[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.20
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
lib
/
python3.6
/
site-packages
/
pip
/
_vendor
/
urllib3
/
util
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 __pycache__
SET
[ DEL ]
📄 __init__.py
1,044 B
SET
[ EDIT ]
|
[ DEL ]
📄 connection.py
4,237 B
SET
[ EDIT ]
|
[ DEL ]
📄 request.py
3,705 B
SET
[ EDIT ]
|
[ DEL ]
📄 response.py
2,343 B
SET
[ EDIT ]
|
[ DEL ]
📄 retry.py
15,104 B
SET
[ EDIT ]
|
[ DEL ]
📄 selectors.py
21,147 B
SET
[ EDIT ]
|
[ DEL ]
📄 ssl_.py
12,214 B
SET
[ EDIT ]
|
[ DEL ]
📄 timeout.py
9,757 B
SET
[ EDIT ]
|
[ DEL ]
📄 url.py
6,798 B
SET
[ EDIT ]
|
[ DEL ]
📄 wait.py
1,451 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: wait.py
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted with immediately. """ if not HAS_SELECT: raise ValueError('Platform does not have a selector') if not isinstance(socks, list): # Probably just a single socket. if hasattr(socks, "fileno"): socks = [socks] # Otherwise it might be a non-list iterable. else: socks = list(socks) with DefaultSelector() as selector: for sock in socks: selector.register(sock, events) return [key[0].fileobj for key in selector.select(timeout) if key[1] & events] def wait_for_read(socks, timeout=None): """ Waits for reading to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be read from immediately. """ return _wait_for_io_events(socks, EVENT_READ, timeout) def wait_for_write(socks, timeout=None): """ Waits for writing to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be written to immediately. """ return _wait_for_io_events(socks, EVENT_WRITE, timeout)