mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Replace all the platform-specific TERMIOS modules with a portable version
based on the termios module. The only added "feature" is the deprecation warning it spits out.
This commit is contained in:
parent
1191d0148f
commit
ddd802cbd7
14 changed files with 17 additions and 3873 deletions
17
Lib/TERMIOS.py
Normal file
17
Lib/TERMIOS.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"""Backward-compatibility version of TERMIOS; export constants exported by
|
||||
termios, and issue a deprecation warning.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
warnings.warn("the TERMIOS module is deprecated; please use termios",
|
||||
DeprecationWarning)
|
||||
|
||||
# Ignore further deprecation warnings about this module
|
||||
warnings.filterwarnings("ignore", "", DeprecationWarning, __name__)
|
||||
|
||||
|
||||
# Export the constants known to the termios module:
|
||||
from termios import *
|
||||
|
||||
# and *only* the constants:
|
||||
__all__ = [s for s in dir() if s[0] in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue