/home/me/example.com/passenger_wsgi.pyIn the Python script, to refer to the directory that is sibling to the script:
/home/me/example.com/virtualenv
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'virtualenv')Note that this will yield the same result even if the script is a symlink to a file located elsewhere, i.e. __file__ refers to the location of the symlink and not the original file.
0 comments:
Post a Comment