An environment-proof way to determine the user ID is to use `pwd.getpwuid(os.getuid()).pw_name`. (See line 753 in the same module.)