diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-13 09:01:06 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-13 09:01:06 (GMT) |
commit | a0599575aafdd7193d7f9be05801ec9f94cac275 (patch) | |
tree | 0e460bb36c51c370f3dcdc210f425c728e5a8d3f /Lib/pty.py | |
parent | ef8b654bbea15dc55767a7095e01dff7a3ca86cb (diff) | |
download | cpython-a0599575aafdd7193d7f9be05801ec9f94cac275.zip cpython-a0599575aafdd7193d7f9be05801ec9f94cac275.tar.gz cpython-a0599575aafdd7193d7f9be05801ec9f94cac275.tar.bz2 |
A disgusting "fix" for the test___all__ failure under Windows.
Diffstat (limited to 'Lib/pty.py')
-rw-r--r-- | Lib/pty.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -8,6 +8,17 @@ from select import select import os + +# Absurd: import termios and then delete it. This is to force an attempt +# to import pty to raise an ImportError on platforms that lack termios. +# Without this explicit import of termios here, some other module may +# import tty first, which in turn imports termios and dies with an +# ImportError then. But since tty *does* exist across platforms, that +# leaves a damaged module object for tty in sys.modules, and the import +# of tty here then appears to work despite that the tty imported is junk. +import termios +del termios + import tty __all__ = ["openpty","fork","spawn"] |