[Numpy-discussion] Reading automatically all the parameters from a file

2011-11-30 Thread Giovanni Plantageneto
Dear all, I have a simple question. I would like to have all the parameters of a model written in a configuration file (text), and I would like to have all the parameters in the file automatically defined inside a program. I find ConfigParser a bit low level, is there any function that automaticall

Re: [Numpy-discussion] Copy netcdf attributes between different files

2011-11-14 Thread Giovanni Plantageneto
Yes, thanks! It works, but the syntax is setattr(flle2,att,getattr(file1,att)) 2011/11/14 Jeff Whitaker : > On 11/14/11 10:04 AM, Giovanni Plantageneto wrote: >> >> Hi everybody, >> I am using netCDF4 library to read and write from netcdf files. I >> would like to cop

[Numpy-discussion] Copy netcdf attributes between different files

2011-11-14 Thread Giovanni Plantageneto
Hi everybody, I am using netCDF4 library to read and write from netcdf files. I would like to copy all the attributes of one file to another one, in a way like this: --- from netCDF4 import Dataset as ncdf file1 = ncdf('file1.nc', mode='r', format='NETCDF4_CLASSIC') ... file2 = ncdf('file1.nc',