How to get Desktop location?

后端 未结 7 647
情深已故
情深已故 2020-12-08 15:30

I\'m using Python on Windows and I want a part of my script to copy a file from a certain directory (I know its path) to the Desktop.

I used this:

sh         


        
相关标签:
7条回答
  • 2020-12-08 16:16

    All those answers are intrinsecally wrong : they only work for english sessions.

    You should check the XDG directories instead of supposing it's always 'Desktop'.

    Here's the correct answer: How to get users desktop path in python independent of language install (linux)

    0 讨论(0)
提交回复
热议问题