29 Apr 2017 os.getlogin() return the user that is executing the, so it can be: path = os.path.join ('..','Documents and Settings',os.getlogin(),'Desktop'). or, using getpass.getuser .