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 merits. I like to combine ConfigObj with argparse; something like: #~~~ parser = argparse.ArgumentParser() <add arguments to parser here> cfg = configobj.ConfigObj("params_file.cfg") parser.set_defaults(**cfg.config) #~~~ Then call parser.parse_args, which will override parameters in the config file by specifying values on the command line. Cheers, -Tony
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion