title: Python convert string object into dictionary
body: <p>I have been working to build a complex data structure which would return a dictionary. Currently that class return string object of the form</p>
  
  <pre><code>{
     cset : x,    
     b1   : y,
     b2   : z,    
     dep  : {    
                cset : x1,
                b1   : y1,    
                b2   : z1,    
                dep  : {    
                           cset : x2,     
                           b1   : y2,    
                           b2   : z2,    
                           dep  : &lt;same as above.it  recurses few more levels&gt;                         
                           ...  
                       }
          }
      }
  </code></pre>
  
  <p>I want to convert this whole string object into dictionary.
  I read on one of the articles to use <code>pickle</code> module, but I don't want to serialize it into some file and use it.</p>
  
  <p>Ref : <a href="http://bytes.com/topic/python/answers/36059-convert-dictionary-string-vice-versa" rel="nofollow noreferrer">http://bytes.com/topic/python/answers/36059-convert-dictionary-string-vice-versa</a></p>
  
  <p>I am looking for some other neater ways of doing it, if possible.</p>
  
  <p>Would be great to know any such ways.</p>