def check_enableusersite():
 if (hasattr(sys, 'flags') and getattr(sys.flags, 'no_user_site', False)):
  return False
 if (hasattr(os, 'getuid') and hasattr(os, 'geteuid')):
  if (os.geteuid() != os.getuid()):
   return None
 if (hasattr(os, 'getgid') and hasattr(os, 'getegid')):
  if (os.getegid() != os.getgid()):
   return None
 return True

def check_enableusersite ( ) : if ( hasattr ( sys , 'flags' ) and getattr ( sys . flags , 'no_user_site' , False ) ) : return False if ( hasattr ( os , 'getuid' ) and hasattr ( os , 'geteuid' ) ) : if ( os . geteuid ( ) != os . getuid ( ) ) : return None if ( hasattr ( os , 'getgid' ) and hasattr ( os , 'getegid' ) ) : if ( os . getegid ( ) != os . getgid ( ) ) : return None return True
check if user site directory is safe for inclusion the function tests for the command line flag .