I am writing my second python script to try to parse the contents of a configuration file and would like to get noob advice. I'm not sure if it is better to use regex to parse my script from its few lines? I also read about dictionaries and wondered if this would be good practice. I'm not necessarily looking for the code by simply clicking in the right direction.
Example: My configuration file is as follows.
Job {
Name = "host.domain.com-foo"
Client = host.domain.com-fd
JobDefs = "DefaultJob"
FileSet = "local"
Write Bootstrap = "/etc/foo/host.domain.com-foo.bsr"
Pool = storage-disk1
}
Should I use regex, line splitting, or maybe a module? If I had several tasks in my configuration file, would I use a dictionary to correlate the task with the pool?