def check_enableusersite():
    if sys.flags.no_user_site:
        return False

    if hasattr(os, "getuid") and hasattr(os, "geteuid"):
        # check process uid == effective uid
        if os.geteuid() != os.getuid():
            return None
    if hasattr(os, "getgid") and hasattr(os, "getegid"):
        # check process gid == effective gid
        if os.getegid() != os.getgid():
            return None

    return True
Check if user site directory is safe for inclusion
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/site.py/check_enableusersite