[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 is a wa
[EMAIL PROTECTED] wrote:
> How to check if a file is closed?
>>> f = open('trashme.txt', 'w')
>>> f
>>> dir(f)
['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__',
'__init__', '__iter__', '__new__', '__reduce__', '__reduce_ex__',
'__repr__', '__setattr__', '__str__', 'close', '