title: How can I make configuration information visible to imported modules?
body: <p>I can see a similar question has been asked before but I couldn't understand the answers given, they related to a specific python configuration file.</p>
  
  <p>I have a large number of python (and shell) scripts which read configuration information such as paths, database settings, etc from a simply formatted configuration file, which I can easily parse with ConfigParser when using Python (and also easily use for the shell scripts too), e.g.:</p>
  
  <pre><code>[paths]
  mypath = /another/path/
  fileExt = .zip
  </code></pre>
  
  <p>The path to the config file was hardwired, both in the main script but also in a couple of modules where it is required.  As expected, it is a pain as I need a couple of different config files for testing, for different systems, etc, and I'd prefer just to pass the relevant one as an input to the main script instead but this doesn't really work either.</p>
  
  <p>Where I ran into the issue, I have:</p>
  
  <ul>
  <li>Main script, A, that calls functions from a locally imported script, 
  B.   </li>
  <li>In B, before the functions are defined, there is a function call
  to an imported function from another file, C. </li>
  <li>A and C never talk.</li>
  </ul>
  
  <p>I could pass the config file to the functions as a variable (seems messy) but I still can't get it to the file I've called "C" above.</p>