Skip to content
Snippets Groups Projects

Accept file handle

Merged Vincent POLLET requested to merge accept_file_handle into sliced_stream

Allow StreamFile class to accept a file handle of the hdf5 file, and use bob.io.base.HDF5File only if a path is provided.

Advantage:

  • Allows to use bob.io.stream with different back-end for interacting with hdf5 library.

Drawback:

  • Less clear who is in charge of opening and closing the file: in the case a string is received, StreamFile handles opening and closing - in the case a file handle is given, the owner of the file must take care of it.
  • If someone provides a file handle which doesn't have a "lread" function, reading will fail and the error won't be very helpful. Concretely, it would be good to list the "back-end" that will work ?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading