A Saturday 08 May 2010 03:20:37 escriguéreu:
> Subject: PyTables: multiple open filehandles
> From: Florian Schroff <gschroff@...>
> To: pytables-users@...
> Date: Saturday 02:45:33
> I just realized that closing one of multiple open (readonly) filehandles
> closes all other filehandles:
> fh,fh2 are both closed.
> Is this a bug or should that be expected behavior?
This is the expected behavior. In the current implementation in trunk, re-
opening a file always returns the already-opened handler, so closing any of
the handler, will automatically close all the others. You can use the
`File.isopen` attribute in order to determine if the status of the file
handler and re-open it manually, if necessary.
This is not the same behaviour as `open()` in Python, but at least the above
behaviour allows to re-open the same file many times.
[PS: Next time please write to the list from a subscribed address. Thanks!]
Get latest updates about Open Source Projects, Conferences and News.