(p, file_path, lua_path=None)
return None
Get the full file path for a require().

    Args:
        p: The require() path.
        file_path: The path of the file containing the require().
        lua_path: The library loading path, in PICO8_LUA_PATH format.

    Returns:
        The absolute path to the require()'d file, or None if no file
        was found for the given arguments.
Get the full file path for a require().
Get the full file path for a require () .
def _locate_require_file(p, file_path, lua_path=None):
    """Get the full file path for a require().

    Args:
        p: The require() path.
        file_path: The path of the file containing the require().
        lua_path: The library loading path, in PICO8_LUA_PATH format.

    Returns:
        The absolute path to the require()'d file, or None if no file
        was found for the given arguments.
    """
    rel_path_base = os.path.dirname(file_path)
    if lua_path is None:
        lua_path = os.getenv('PICO8_LUA_PATH')
        if lua_path is None:
            lua_path = DEFAULT_LUA_PATH
    for lookup_p in lua_path.split(';'):
        candidate = lookup_p.replace('?', p)
        if not candidate.startswith(os.path.sep):
            candidate = os.path.join(rel_path_base, candidate)
        if os.path.isfile(candidate):
            return candidate
    return None
def _locate_require_file ( p , file_path , lua_path = None ) : rel_path_base = os . path . dirname ( file_path ) if lua_path is None : lua_path = os . getenv ( 'PICO8_LUA_PATH' ) if lua_path is None : lua_path = DEFAULT_LUA_PATH for lookup_p in lua_path . split ( ';' ) : candidate = lookup_p . replace ( '?' , p ) if not candidate . startswith ( os . path . sep ) : candidate = os . path . join ( rel_path_base , candidate ) if os . path . isfile ( candidate ) : return candidate return None