title: How to access an editable configuration file once a Python package has been installed via setuptools or distutils?
body: <p><strong>How do I allow a package installed with 'python setup.py install' to access external configuration files?</strong> </p>
  
  <p>I am currently trying to use distutils/setuptools to install a Python package for RHEL. This Python package was originally written in such a way that it operated as a set of scripts, which needed filesystem access to a variety of configuration files, logs, etc. Now that I am trying to create an installable package out of this setup, I'm having difficulties interacting with the filesystem for the necessary files.</p>
  
  <p>These files should be editable. In addition to the base question, what are the best practices for this type of behavior? I.e. what are the best practices for managing the configuration of Python packages that are installed via <code>setuptools</code> or <code>distutils</code>, and for these packages to interact with the filesystem. I assume there are two halves of this coin: configuring the locations for the files on the install side, and accessing the information on the code implementation side. Any advice for optimizing both of these aspects would be greatly appreciated.</p>
  
  <h3>Additional Information:</h3>
  
  <p>I essentially need to access the "config" directory, once the package is installed. The location of the 'config' directory can be anywhere (that the user has privileges to) on the filesystem, and should, in itself, be configurable before installing the package. The project looks like this:</p>
  
  <ul>
  <li>project/
  
  <ul>
  <li>main/
  
  <ul>
  <li>__init__.py</li>
  <li>script1.py</li>
  <li>script2.py</li>
  <li>service.py (Flask web service runner)</li>
  <li>...other python files that interact with above</li>
  </ul></li>
  <li>config/
  
  <ul>
  <li>sub-directory/
  
  <ul>
  <li>sub-directory/
  
  <ul>
  <li>config_file.ini</li>
  </ul></li>
  </ul></li>
  <li>sub-directory/
  
  <ul>
  <li>...</li>
  </ul></li>
  <li>...</li>
  </ul></li>
  <li>logs/
  
  <ul>
  <li>log_file.log</li>
  </ul></li>
  </ul></li>
  </ul>