title: What's the best practice using a settings file in Python?
body: <p>I have a command line script that I run with a lot of arguments. I have now come to a point where I have too many arguments, and I want to have some arguments in dictionary form too.</p>
  
  <p>So in order to simplify things I would like to run the script with a settings file instead. I don't really know what libraries to use for the parsing of the file. What's the best practice for doing this? I could of course hammer something out myself, but if there is some library for this, I'm all ears.</p>
  
  <p>A few 'demands':</p>
  
  <ul>
  <li>Rather than using <code>pickle</code> I would like it to be a straight forward text file that can easily be read and edited.</li>
  <li>I want to be able to add dictionary-like data in it, i.e., some form of nesting should be supported.</li>
  </ul>
  
  <p>A simplified pseudo example file:</p>
  
  <pre><code>truck:
      color: blue
      brand: ford
  city: new york
  cabriolet:
      color: black
      engine:
          cylinders: 8
          placement: mid
      doors: 2
  </code></pre>