Linux sh52.ich-4.com 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
LiteSpeed
Server IP : 198.143.147.58 & Your IP : 216.73.217.21
Domains :
Cant Read [ /etc/named.conf ]
User : actualbuzz
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.9 /
site-packages /
serial /
urlhandler /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-02-03 14:58
__init__.py
0
B
-rw-r--r--
2015-08-02 22:00
protocol_alt.py
1.95
KB
-rw-r--r--
2016-06-08 04:05
protocol_hwgrep.py
3.05
KB
-rw-r--r--
2016-06-08 04:05
protocol_loop.py
9.88
KB
-rw-r--r--
2016-10-05 01:29
protocol_rfc2217.py
277
B
-rw-r--r--
2016-02-02 02:57
protocol_serve-rfc2217.py
277
B
-rw-r--r--
2016-02-02 02:57
protocol_socket.py
13.8
KB
-rw-r--r--
2017-05-06 21:16
protocol_spy.py
8.81
KB
-rw-r--r--
2016-06-08 04:05
Save
Rename
#! python # # This module implements a special URL handler that allows selecting an # alternate implementation provided by some backends. # # This file is part of pySerial. https://github.com/pyserial/pyserial # (C) 2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause # # URL format: alt://port[?option[=value][&option[=value]]] # options: # - class=X used class named X instead of Serial # # example: # use poll based implementation on Posix (Linux): # python -m serial.tools.miniterm alt:///dev/ttyUSB0?class=PosixPollSerial try: import urlparse except ImportError: import urllib.parse as urlparse import serial def serial_class_for_url(url): """extract host and port from an URL string""" parts = urlparse.urlsplit(url) if parts.scheme != 'alt': raise serial.SerialException( 'expected a string in the form "alt://port[?option[=value][&option[=value]]]": ' 'not starting with alt:// ({!r})'.format(parts.scheme)) class_name = 'Serial' try: for option, values in urlparse.parse_qs(parts.query, True).items(): if option == 'class': class_name = values[0] else: raise ValueError('unknown option: {!r}'.format(option)) except ValueError as e: raise serial.SerialException( 'expected a string in the form ' '"alt://port[?option[=value][&option[=value]]]": {!r}'.format(e)) if not hasattr(serial, class_name): raise ValueError('unknown class: {!r}'.format(class_name)) cls = getattr(serial, class_name) if not issubclass(cls, serial.Serial): raise ValueError('class {!r} is not an instance of Serial'.format(class_name)) return (''.join([parts.netloc, parts.path]), cls) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if __name__ == '__main__': s = serial.serial_for_url('alt:///dev/ttyS0?class=PosixPollSerial') print(s)