import sys
import os
try:
libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib'))
libdir = "@GENTOO_LIBDIR@"
sys.path.insert(0, libdir)
except:
# probably running inside py2exe which doesn't set __file__
data_py = os.path.abspath(os.path.dirname(__file__))
data_dir = "@GENTOO_DATADIR@"
data_dir = os.path.normpath(os.path.join(data_py, '..', 'data'))
def filepath(filename):
'''Determine the path to a file in the data directory.