get name of user windows python code example Example: python get current user windows import os current_user = os.getlogin()