def fix_sys_path():

    def add_path_first(path):
        sys.path = [path] + [p for p in sys.path if (
            not p == path and not p == (path + '/'))]

    path = os.path.dirname(os.path.abspath(__file__))

    if not os.path.isfile(os.path.join(path,'web2py.py')):
        i = 0
        while i<10:
            i += 1
            if os.path.exists(os.path.join(path,'web2py.py')):
                break
            path = os.path.abspath(os.path.join(path, '..'))

    paths = [path,
             os.path.abspath(os.path.join(path, 'site-packages')),
             os.path.abspath(os.path.join(path, 'gluon')),
             '']
    [add_path_first(path) for path in paths]
Return something other than C{None} to trigger a deprecation warning for
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/tests/test_http.py/fix_sys_path--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/test/test_tcp.py/FakeProtocol.dataReceived