how to get windows username with python code example Example: python get username windows username = os.getlogin()