summaryrefslogtreecommitdiffstats
path: root/Lib/pty.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-10 05:17:02 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-10 05:17:02 (GMT)
commit66aaaae54c6ce98fbe322cabee4c85f18104cc8b (patch)
tree1a15cbe5d0413533ed367c750c81aaccee5d9980 /Lib/pty.py
parent4bc808533f6f2d57c31493f6bb8f18594413fb5c (diff)
downloadcpython-66aaaae54c6ce98fbe322cabee4c85f18104cc8b.zip
cpython-66aaaae54c6ce98fbe322cabee4c85f18104cc8b.tar.gz
cpython-66aaaae54c6ce98fbe322cabee4c85f18104cc8b.tar.bz2
Update to reflect deprecation of the FCNTL module: The fcntl module does
*not* define O_RDWR; get that from the os module.
Diffstat (limited to 'Lib/pty.py')
-rw-r--r--Lib/pty.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pty.py b/Lib/pty.py
index 64d391b..0c203dd 100644
--- a/Lib/pty.py
+++ b/Lib/pty.py
@@ -7,7 +7,7 @@
# Author: Steen Lumholt -- with additions by Guido.
from select import select
-import os, FCNTL
+import os
import tty
__all__ = ["openpty","fork","spawn"]
@@ -55,7 +55,7 @@ def _open_terminal():
pass
else:
try:
- tty_name, master_fd = sgi._getpty(FCNTL.O_RDWR, 0666, 0)
+ tty_name, master_fd = sgi._getpty(os.O_RDWR, 0666, 0)
except IOError, msg:
raise os.error, msg
return master_fd, tty_name
@@ -63,7 +63,7 @@ def _open_terminal():
for y in '0123456789abcdef':
pty_name = '/dev/pty' + x + y
try:
- fd = os.open(pty_name, FCNTL.O_RDWR)
+ fd = os.open(pty_name, os.O_RDWR)
except os.error:
continue
return (fd, '/dev/tty' + x + y)
@@ -75,7 +75,7 @@ def slave_open(tty_name):
opened filedescriptor.
Deprecated, use openpty() instead."""
- return os.open(tty_name, FCNTL.O_RDWR)
+ return os.open(tty_name, os.O_RDWR)
def fork():
"""fork() -> (pid, master_fd)