Hi, I'm having a similar problem but reading a string write by pytables from C.
Any clue how to do this ? More info here: Thanks, On Tue, 2011-03-01 at 15:46 -0600, Gerd Heber wrote: > Pavel, how are you? If you want to write a fixed-length string scalar > attribute, > here's a snippet of IronPython code that will get you started. > > def addScalarStringAttribute(dset): > > string ='ABCD' > > dspace = H5S.create(H5S.H5SClass.SCALAR) > dtype = H5T.copy(H5T.H5Type.C_S1) > H5T.setSize(dtype, 5) > attr = H5A.create(dset, 'Character attribute', dtype, dspace); > > enc = System.Text.ASCIIEncoding() > H5A.write(attr, dtype, H5Array[System.Byte](enc.GetBytes(string))) > > H5A.close(attr) > H5T.close(dtype) > H5S.close(dspace) > return None > > Best, G. > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] > On Behalf Of Pavel Rudchenko > Sent: Tuesday, March 01, 2011 1:16 PM > To: [email protected] > Subject: [Hdf-forum] Read and wrote string attributes > > Hello! > > How may I read and wrote string attributes od dataset? > I use HDF5DotNet and C# .net 2010. > I can't find an example and string type on H5T.H5Type. > > Thank you. > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org > > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
