pytty

changeset 26:381984878a49

Switch pytty.TTY doctest to use pty.openpty instead of os.openpty
author Arc Riley <arcriley@gmail.com>
date Mon, 09 Jul 2012 04:43:33 -0400
parents 219b08e4217b
children 0c10d2151b79
files src/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/__init__.py	Mon Jul 09 04:35:36 2012 -0400
     1.2 +++ b/src/__init__.py	Mon Jul 09 04:43:33 2012 -0400
     1.3 @@ -38,8 +38,8 @@
     1.4      user to change baud rate, flow control, and other settings often available
     1.5      to tty devices.
     1.6  
     1.7 -        >>> import os
     1.8 -        >>> ptys = os.openpty()  # create two connected ptys for testing
     1.9 +        >>> import pty
    1.10 +        >>> ptys = pty.openpty()  # create two connected ptys for testing
    1.11          >>> master = pytty.TTY(ptys[0])
    1.12          >>> slave = pytty.TTY(ptys[1])
    1.13          >>> slave.write('Greetings, Master.'.encode()) == 18