[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

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

2011-11-30 Thread Robert Kern
On Wed, Nov 30, 2011 at 11:09, Giovanni Plantageneto g.plantagen...@gmail.com wrote: 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

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

2011-11-30 Thread Alan G Isaac
On 11/30/2011 6:09 AM, Giovanni Plantageneto wrote: I find ConfigParser a bit low level, is there any function that automatically reads everything from a file? You could just use a dictionary for your params, and import it from your configuration file. If you insist on an ini format,

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

2011-11-30 Thread Paul Anton Letnes
On 30. nov. 2011, at 12:09, Giovanni Plantageneto wrote: 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

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

2011-11-30 Thread Benjamin Root
On Wednesday, November 30, 2011, Robert Kern robert.k...@gmail.com wrote: On Wed, Nov 30, 2011 at 11:09, Giovanni Plantageneto g.plantagen...@gmail.com wrote: 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

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

2011-11-30 Thread Neal Becker
My suggestion is: don't. It's easier to script runs if you read parameters from the command line. I recommend argparse. Giovanni Plantageneto wrote: 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

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

2011-11-30 Thread Tony Yu
On Wed, Nov 30, 2011 at 1:49 PM, Neal Becker ndbeck...@gmail.com wrote: My suggestion is: don't. It's easier to script runs if you read parameters from the command line. I recommend argparse. I think setting parameters in a config file and setting them on the command line both have their