the `os.path` module contains utility functions for manipulating file paths. Along with the `__file__` variable, which is the absolute path to the file being executed, you can programmatically add the correct path to PYTHONPATH.

Some helpful functions in `os.path` would be `abspath`, `dirname`, and `join`. Here's the [documentation](http://docs.python.org/2/library/os.path.html).