Writing CSV Files to User

If I am trying to write a csv file to the user's desktop in my main .py file, how do I obtain the correct path that I want to write to?

Is this from inside a website's code? Or are you talking about a Python script that the user would run on their own machine?