title: Reading YAML file with Python results in AttributeError
body: <p>I'm trying to make a script to back up a MySQL database. I have a <code>config.yml</code> file:</p>
  
  <pre><code>DB_HOST :'localhost'
  DB_USER : 'root'
  DB_USER_PASSWORD:'P@$$w0rd'
  DB_NAME : 'moodle_data'
  BACKUP_PATH : '/var/lib/mysql/moodle_data'
  </code></pre>
  
  <p>Now I need to read this file. My Python code so far:</p>
  
  <pre><code>import yaml
  config = yaml.load(open('config.yml'))
  print(config.DB_NAME)
  </code></pre>
  
  <p>And this is an error that comes up:</p>
  
  <pre><code>file "conf.py", line 4, in &lt;module&gt;
  print(config.DB_NAME)
  AttributeError: 'str' object has no attribute 'DB_NAME'
  </code></pre>
  
  <p>Does anyone have an idea where I made a mistake?</p>