title: Proper design of Python project
body: <p>I'm planning to have project with following structure:</p>
  
  <pre><code>./runme.py
  ./my_modules/__init__.py
  ./my_modules/global_imports.py
  ./my_modules/user_defined_functions.py
  </code></pre>
  
  <p>Idea is to store important variables in <code>global_imports.py</code> from where they will be imported into <code>runme.py</code> using <code>from my_modules.global_imports import *</code> (I know it is a bad practice import modules this way, but I promise there will be just few variables with not colliding names)</p>
  
  <p>Four questions:</p>
  
  <ol>
  <li><p>Two of the variables contained inside <code>global_imports.py</code> should be <code>SCRIPT_PATH</code> and <code>SCRIPT_DIR</code>. I've tried <code>SCRIPT_PATH = os.path.realpath(__file__)</code> and <code>SCRIPT_DIR = os.path.dirname(SCRIPT_PATH)</code> but it returns path (directory) for <code>global_imports.py</code> not for <code>runme.py</code>. How can I get path (directory) of <code>runme.py</code>?</p></li>
  <li><p>Inside <code>global_imports.py</code> I will probably import modules such as <code>os</code> and <code>sys</code>. I also need to import those modules inside <code>runme.py</code>. Is this considered as problem, when modules are imported first from another module and later from main script or vice versa?</p></li>
  <li><p>Is it possible to import variables from <code>global_imports.py</code> into <code>user_defined_functions.py</code>? I consider this as bad practice I'm just curious.</p></li>
  <li><p>Is there better approach to separate project into modules?</p></li>
  </ol>