title: Turning string with embedded brackets into a dictionary
body: <p>What's the best way to build a dictionary from a string like the one below:</p>
  
  <pre><code>"{key1 value1} {key2 value2} {key3 {value with spaces}}"
  </code></pre>
  
  <p>So the key is always a string with no spaces but the value is either a string or a string in curly brackets (it has spaces)?</p>
  
  <p>How would you dict it into:</p>
  
  <pre><code>{'key1': 'value1',   'key2': 'value2',   'key3': 'value with spaces'}
  </code></pre>