From: Fred Drake Date: Thu, 10 May 2001 15:57:17 +0000 (+0000) Subject: Update example to no longer use the FCNTL module. X-Git-Tag: v2.2a3~1838 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=791c351b3d9b311da1ab71a53619d3947a7fce46;p=thirdparty%2FPython%2Fcpython.git Update example to no longer use the FCNTL module. --- diff --git a/Doc/lib/libsignal.tex b/Doc/lib/libsignal.tex index 11f07373fa87..fe9b18012378 100644 --- a/Doc/lib/libsignal.tex +++ b/Doc/lib/libsignal.tex @@ -155,7 +155,7 @@ the file; if the operation takes too long, the alarm signal will be sent, and the handler raises an exception. \begin{verbatim} -import signal, os, FCNTL +import signal, os def handler(signum, frame): print 'Signal handler called with signal', signum @@ -166,7 +166,7 @@ signal.signal(signal.SIGALRM, handler) signal.alarm(5) # This open() may hang indefinitely -fd = os.open('/dev/ttyS0', FCNTL.O_RDWR) +fd = os.open('/dev/ttyS0', os.O_RDWR) signal.alarm(0) # Disable the alarm \end{verbatim}