Thanks, I knew I had seen something about it somewhere.
So I can go
fid = h5open("data.jld", "r")
names(fid)
I'm assuming there's currently no way to get names with @load as per above
so I only have to open the file once?
Would be great if @load could return something which allowed me to inspect
the variable names, even just an array of strings would be good.
Is that remotely possible? If so I can happily create an issue.
On Thursday, 5 June 2014 04:33:54 UTC+1, Tim Holy wrote:
>
>
> https://github.com/timholy/HDF5.jl/blob/master/doc/hdf5.md#getting-information
>
>
> The things that work for plain HDF5 files should also work for JLD. If
> not, it
> should be viewed as a bug (barring things I'm not thinking of ATM).
>
> --Tim
>
> On Wednesday, June 04, 2014 05:56:23 PM Samuel Colvin wrote:
> > I'm sure this has been asked before, but I can't find an answer.
> >
> > Given a .jld files, how do I inspect it to list the variables it
> contains?
> >
> > Right now I'm resorting to
> > before=Set(names(Main))
> > @load "data.jld"
> > after = Set(names(Main))
> > varnames = collect(setdiff(after,before))
> >
> > That works but is obviously ugly and error prone, ie. if I have a
> variable
> > defined before the @load it wont come up in varnames.
> >
> > What's the canonical way of doing this?
>