Hello
Actually I've investigated a bit more, and it seems the problem doesn't come
from pywin32, but from the normal python file objects, which are not able to
cope properly with win32 fucntions (even with get_osf_handle() etc.). It
seems I'll have to use my own file objects in python if I want to lock them
on byte ranges.
regards,
Pascal Chambon
2009/7/16 Pascal Chambon <pyt...@gm...>
>
>
> Hello
>
> I don't know yet if it's a pywin32-specific bug, but locking file ranges
> with lockfileex currently prevents other processes from reading previous
> parts of the files : read operation on python file objects return IOErrors,
> and read operations on handles obtained via CreateFile() return empty
> strings.
>
> Normally, as long as we dont read or write (depending on teh type of lock)
> the locked range, we shouldn't have any troubel, should we ? Has anyone
> around already used concurrent file accesses with lokfile ex ?
>
> Here are two python scripts showing the problem - just launch the first
> one, then in parralel teh second one.
>
> regards,
> Pascal Chambon
>
>
>
>
|