> It's easy enough to create the HDF5 file with a user block, but how,
> within h5py or (more likely) base Python, can one write into that
> space? I can't find any sample code that does that.
If you already have a file with a user block, it may simply be
possible to open it in Python alongside the HDF5 file. When a user
block is present, HDF5 won't ever touch that section, so as long as
you're careful not to write past the end of the user block and stomp
on the beginning of the "HDF5 section", then I think it would be OK.
> The best approach I can come up with is to create and write into the
> user block file, create and close an "empty" HDF5 file, run h5jam on
> these small files, and then open the resulting file in 'r+' mode to
> write the real HDF5 data into it. Seems a little kludgy, but ought to
> work.
I think a useful first step on the h5py side would be to add a
userblock keyword to File, so you can at least create files with a
userblock in one go. I'll see whether it's feasible to add this.
Andrew