title: Handling util functions in python
body: <p>In our current c-project, we use python scripts for support and testing purposes such as unit testing, integration testing, benchmarking and communication.</p>
  
  <p>Current folder structure (most files not shown):</p>
  
  <pre><code>.
  |-- workingcopy1
  |-- |-- config
  |-- |-- |-- __init__.py
  |-- |-- |-- parameters_one.py
  |-- |-- |-- parameters_two.py
  |-- |-- |-- parameters_three.py
  |-- |-- src
  |-- |-- |-- main_application_c_code.c
  |-- |-- tests
  |-- |-- |-- tools
  |-- |-- |-- |-- display_communication_activity.py
  |-- |-- |-- run_all_unit_tests.py
  |-- |-- tools
  |-- |-- |-- script1.py
  |-- |-- |-- script2.py
  |-- |-- |-- script3.py
  |-- |-- utils
  |-- |-- |-- python_utils
  |-- |-- |-- |-- __init__.py
  |-- |-- |-- |-- communication_utils.py
  |-- |-- |-- |-- conversion_utils.py
  |-- |-- |-- |-- constants.py
  |-- |-- |-- |-- time_utils.py
  |-- workingcopy2
  ...
  |-- workingcopy3
  ...
  </code></pre>
  
  <p>Some python files are intented to be executed as script files (<code>$ python script1.py</code>) and some are intended to be included as modules in other python files.</p>
  
  <p>What we would like to achive is a structure that enables us to have parameter and utility functions that can be used by:</p>
  
  <ul>
  <li>Test code</li>
  <li>Other utility codes</li>
  <li>Smaller python application used for monitoring of our system. I.e. custom benchmarking tools</li>
  </ul>
  
  <p>It should also be possible to have several workingcopies checked out</p>
  
  <p>Up until this date, all scripts have following lines at top:</p>
  
  <pre><code>import os, sys
  current_path = os.path.abspath(os.path.dirname(__file__))
  sys.path.append(os.path.join(current_path, '..', 'utils')) # Variates depending on script location in file tree
  sys.path.append(os.path.join(current_path, '..', 'config')) # Variates depending on script location in file tree
  import python_utils.constants as constants
  import config.parameters_one as parameters
  </code></pre>
  
  <p>With about 20+ script files this has become hard to maintain. Is there any better way to achive this?</p>