title: python single configuration file
body: <p>I am developing a project that requires a single configuration file whose data is used by multiple modules.<br>
  My question is: what is the common approach to that? should i read the configuration file from each
  of my modules (files) or is there any other way to do it?</p>
  
  <p>I was thinking to have a module named config.py that reads the configuration files and whenever I need a config I do <code>import config</code> and then do something like <code>config.data['teamsdir']</code> get the <code>'teamsdir'</code> property (for example).</p>
  
  <p><strong>response</strong>: opted for the conf.py approach then since it it is modular, flexible and simple</p>
  
  <p>I can just put the configuration data directly in the file, latter if i want to read from a json file a xml file or multiple sources i just change the conf.py and make sure the data is accessed the same way.</p>
  
  <p><strong>accepted answer</strong>: chose "Alex Martelli" response because it was the most complete. voted up other answers because they where good and useful too.</p>