diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-09 21:13:23 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-09 21:13:23 (GMT) |
commit | 76d61399614604504f0bb1bf149d0f1158593524 (patch) | |
tree | 066c8efd40b0501c0f69bff141f74f70894ecbb3 /Lib | |
parent | bc7809b52930e8d17ffffb78b2513c70cf808678 (diff) | |
download | cpython-76d61399614604504f0bb1bf149d0f1158593524.zip cpython-76d61399614604504f0bb1bf149d0f1158593524.tar.gz cpython-76d61399614604504f0bb1bf149d0f1158593524.tar.bz2 |
Add a new FCNTL.py backward compatibility module that issues a deprecation
warning. This is similar to the TERMIOS backward compatbility module.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/FCNTL.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/FCNTL.py b/Lib/FCNTL.py new file mode 100644 index 0000000..a31a7f8 --- /dev/null +++ b/Lib/FCNTL.py @@ -0,0 +1,14 @@ +"""Backward-compatibility version of FCNTL; export constants exported by +fcntl, and issue a deprecation warning. +""" + +import warnings +warnings.warn("the FCNTL module is deprecated; please use fcntl", + DeprecationWarning) + + +# Export the constants known to the fcntl module: +from fcntl import * + +# and *only* the constants: +__all__ = [s for s in dir() if s[0] in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"] |