def relpath ( path ) : return os . path . normpath ( os . path . join ( os . path . abspath ( os . path . dirname ( __file__ ) ) , path ) )
python make path absolute
Path helper gives you a path relative to this file
def relpath(path):
    """Path helper, gives you a path relative to this file"""
    return os.path.normpath(
        os.path.join(os.path.abspath(os.path.dirname(__file__)), path)
    )