[Python-checkins] python/dist/src/Lib pty.py,1.12,1.13

loewis@users.sourceforge.net loewis@users.sourceforge.net
Wed, 01 Jan 2003 01:51:14 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv4773/Lib

Modified Files:
	pty.py 
Log Message:
Expose I_ constants. Auto-detect stropts.h. Properly configure the slave terminal.


Index: pty.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pty.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** pty.py	28 Jul 2002 09:42:57 -0000	1.12
--- pty.py	1 Jan 2003 09:51:11 -0000	1.13
***************
*** 87,91 ****
      Deprecated, use openpty() instead."""
  
!     return os.open(tty_name, os.O_RDWR)
  
  def fork():
--- 87,101 ----
      Deprecated, use openpty() instead."""
  
!     result = os.open(tty_name, os.O_RDWR)
!     try:
!         from fcntl import ioctl, I_PUSH
!     except ImportError:
!         return result
!     try:
!        ioctl(result, I_PUSH, "ptem")
!        ioctl(result, I_PUSH, "ldterm")
!     except IOError:
!         pass
!     return result
  
  def fork():