[ python-Bugs-994605 ] fcntl example is broken

SourceForge.net noreply at sourceforge.net
Wed Jul 21 03:41:21 CEST 2004


Bugs item #994605, was opened at 2004-07-20 11:54
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=994605&group_id=5470

Category: Documentation
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Chris Green (chrisgreen)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: fcntl example is broken

Initial Comment:
http://www.python.org/doc/current/lib/module-fcntl.html
import os,struct, fcntl
f = open(".zshrc", "r+")
rv = fcntl.fcntl(f, fcntl.F_SETFL, os.O_NDELAY)
lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0,
0, 0, 0)
rv = fcntl.fcntl(f,
                 fcntl.F_SETLKW,
                 lockdata)

It was missing an os import and was directly calling
the module 


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2004-07-20 21:41

Message:
Logged In: YES 
user_id=33168

Thanks.  Fixed in Doc/lib/libfcntl.tex 1.36

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=994605&group_id=5470


More information about the Python-bugs-list mailing list