def get_system_username():
    try:
        return getpass.getuser().decode(locale.getdefaultlocale()[1])
    except (ImportError, KeyError, UnicodeDecodeError):
        # KeyError will be raised by os.getpwuid() (called by getuser())
        # if there is no corresponding entry in the /etc/passwd file
        # (a very restricted chroot environment, for example).
        # UnicodeDecodeError - preventive treatment for non-latin Windows.
        return u''
Try to determine the current system user's username.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/auth/management/__init__.py/get_system_username