HDF4
Lars
lkalesch at gmx.net
Mon Mar 5 05:35:32 EST 2001
Hello,
i am looking for a Python module for reading HDF4 data.
I know that there exist a module for HDF5, but unfortunately
HDF5 is not compatible to HDF4.
I tried the following for reading HDF4 data, but this
is faulty and dowdy:
def hdfdump(hdffile,var):
key="Data-Set-"
os.system("ncdump -v "+key+var+" "+hdffile+"> /tmp/hdffile")
f=open('/tmp/hdffile','r')
a=f.read()
f.close()
findexp=key+var+" ="# Data-Set-4 = 23424,23123,..
s1=find(a,findexp)
s2=find(a,";",s1)
b=a[s1+len(findexp):s2]
return b
Thank you very much for your help,
Regards,
Lars Kaleschke
Lars at Seaice.de
http://www.seaice.de
More information about the Python-list
mailing list