msvcrt, open_osfhandle, locking

Mark Hammond mhammond at
Tue Feb 22 23:22:01 CET 2000

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

> 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

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.


More information about the Python-list mailing list