This is what I was looking for. Didn't find it, so I made it :) Python makes life so easy.
You can find here a Cython implementation that communicates Python with the C-API of HDF4 format. First compile the cython files, and here are some tests.
NOTES:
-
The C sources that talk directly to the C-API were generated by this Perl script. I just made the Cython interface.
-
ACE data files have HDF version 4.1r2 link, and
pyhdf
andpython-hdf
libraries don't seem to be friendly with it :\ -
It's been test with HDF4 v4.2.12. In some platforms, it may be necessary to build hdf4 with
fPIC
; i.e.:
$ CFLAGS=-fPIC ./configure --with-zlib=$HOME/local --with-jpeg=$HOME/local --with-szlib=$HOME/local --prefix=$HOME/local
For more details, see here and here.