A python module for global parameters - is this good practice?
<p>I'm a mechanical engineering student, and I'm building a physical simulation using PyODE.</p>

<p>instead of running everything from one file, I wanted to organize stuff in modules so I had:</p>

<ul>
<li>main.py</li>
<li>callback.py</li>
<li>helper.py</li>
</ul>

<p>I ran into problems when I realized that helper.py needed to reference variables from main, but main was the one importing helper!</p>

<p>so my solution was to create a 4th file, which houses variables and imports only external modules (such as time and random).</p>

<p>so I now have:</p>

<ul>
<li>main.py</li>
<li>callback.py</li>
<li>helper.py</li>
<li>parameters.py</li>
</ul>

<p>and all scripts have: <code>import parameters</code> and use: <code>parameters.foo</code> or <code>parameters.bar</code>.</p>

<p>Is this an acceptable practice or is this a sure fire way to make python programmers puke? :)</p>

<p>Please let me know if this makes sense, or if there is a more sensible way of doing it!</p>

<p>Thanks,
-Leav</p>
