Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a0f7e857
Commit
a0f7e857
authored
Jul 01, 2000
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Thomas Wouters: Test script for openpty()
parent
db67739d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
Lib/test/test_openpty.py
Lib/test/test_openpty.py
+23
-0
No files found.
Lib/test/test_openpty.py
0 → 100644
View file @
a0f7e857
# Test to see if openpty works. (But don't worry if it isn't available.)
import
os
from
test_support
import
verbose
,
TestFailed
try
:
if
verbose
:
print
"Calling os.openpty()"
master
,
slave
=
os
.
openpty
()
if
verbose
:
print
"(master, slave) = (%d, %d)"
%
(
master
,
slave
)
except
AttributeError
:
raise
ImportError
,
"No openpty() available."
## # Please uncomment these if os.isatty() is added.
## if not os.isatty(master):
## raise TestFailed, "Master-end of pty is not a terminal."
## if not os.isatty(slave):
## raise TestFailed, "Slave-end of pty is not a terminal."
os
.
write
(
slave
,
'Ping!'
)
print
os
.
read
(
master
,
1024
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment