RE: Check if a file is closed

2006-06-19 Thread Tim Golden
[EMAIL PROTECTED] | How to check if a file is closed? | | On Win32 you can call CreateFile with write and share write and if it | raises an error, the file is closed. | | How to do it in Python??? It's not clear whether you want a cross-platform Python-only solution. But if all you want

Re: Check if a file is closed

2006-06-19 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > How to check if a file is closed? >>> f = open('trashme.txt', 'w') >>> f >>> dir(f) ['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__in

Check if a file is closed

2006-06-19 Thread camillo
How to check if a file is closed? On Win32 you can call CreateFile with write and share write and if it raises an error, the file is closed. How to do it in Python??? Thanks, Camillo -- http://mail.python.org/mailman/listinfo/python-list