Returning useable values from ConfigParse
<p>Using the code described bellow, i can sucessfully retrieve the properties stored into the file.cfg, but how can i use the output into others variables?</p>

<pre><code>from ConfigParser import SafeConfigParser

class Main:

   def get_properties(self, section, *variables):
        cfgFile = 'c:\file.cfg'
        parser = SafeConfigParser()
        parser.read(cfgFile)
        properties= variables
        return {
            variable : parser.get(section,variable) for variable in properties

        }

   def run_me(self):
        config_vars= self.get_properties('database','host','dbname')
        print config_vars

op=Main()
op.run_me()
</code></pre>

<p>Im still learning Python, but i'm not sure what i need to do to set the output into individual variables:</p>

<p>current output:</p>

<pre><code>{'host': 'localhost', 'dbname': 'sample'} 
</code></pre>

<p>what i would like to have:</p>

<pre><code>db_host = localhost
db_name = sample
</code></pre>
