home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Maximum CD 2010 May
/
maximum-cd-2010-05.iso
/
DiscContents
/
boxee-0.9.20.10711.exe
/
system
/
python
/
Lib
/
lib-old
/
lockfile.pyo
(
.txt
)
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Python Compiled Bytecode
|
2009-07-20
|
866 b
|
22 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.4)
import struct
import fcntl
def writelock(f):
_lock(f, fcntl.F_WRLCK)
def readlock(f):
_lock(f, fcntl.F_RDLCK)
def unlock(f):
_lock(f, fcntl.F_UNLCK)
def _lock(f, op):
dummy = fcntl.fcntl(f.fileno(), fcntl.F_SETLKW, struct.pack('2h8l', op, 0, 0, 0, 0, 0, 0, 0, 0, 0))