msvcrt, open_osfhandle, locking

Mark Hammond mhammond at skippinet.com.au
Tue Feb 22 17:22:01 EST 2000


"Roger Baklund" <charoger at online.no> wrote in message
news:tvCs4.5103$kz6.96338 at news1.online.no...

> I'm trying to use msvcrt.open_oshandle() to get a handle so I can
lock a
> file using msvcrt.locking(), but it won't work.

That is becuase you dont need to :-)

> I keep getting "TypeError: illegal argument type for built-in
operation".

open_osfhandle() is used to get a file object back for a Win32 integer
file handle.  The locking module works directly with file object - no
need to deal woth OS handles at all.

Mark.






More information about the Python-list mailing list