← 输入框|github.com|刷新
Skip to content

Config file option #9

Open
Open

Description

@mt-digital

Give users the ability to run scenario series via a config file. Provide fields for default files and directories and HydroShare credentials.

Activity

  1. JohnVolk commented on Jul 8, 2016

    @JohnVolk
    Collaborator

    how about something like this

    prms_config.txt

    it will be a .ini file, then we then use the ConfigParser built in library:

    In [1]: import ConfigParser
    
    In [2]: Config = ConfigParser.ConfigParser()
    
    In [3]: Config.read("prms_config.txt")
    Out[3]: ['prms_config.txt']
    
    In [4]: Config.sections()
    Out[4]: ['optimixation_control_parameters', 'output_stats', 'data_file_paths']
    
    In [5]: Config.get('data_file_paths', 'solrad')
    Out[5]: '/home/user/PRMS-Python/dry_creek/climate/bogus_ridge_daily_shortwave_radiation_langleys.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions