Fred Drake | ddd802c | 2001-02-27 21:35:40 +0000 | [diff] [blame^] | 1 | """Backward-compatibility version of TERMIOS; export constants exported by |
| 2 | termios, and issue a deprecation warning. |
| 3 | """ |
| 4 | |
| 5 | import warnings |
| 6 | warnings.warn("the TERMIOS module is deprecated; please use termios", |
| 7 | DeprecationWarning) |
| 8 | |
| 9 | # Ignore further deprecation warnings about this module |
| 10 | warnings.filterwarnings("ignore", "", DeprecationWarning, __name__) |
| 11 | |
| 12 | |
| 13 | # Export the constants known to the termios module: |
| 14 | from termios import * |
| 15 | |
| 16 | # and *only* the constants: |
| 17 | __all__ = [s for s in dir() if s[0] in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"] |