python - Finding the user's “Downloads” folder

后端 未结 4 1893
逝去的感伤
逝去的感伤 2020-12-05 14:53

I already found this question that suggests to use os.path.expanduser(path) to get the user\'s home directory.

I would like to achieve the same with the

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 15:12

    from pathlib import Path
    downloads_path = str(Path.home() / "Downloads")
    

提交回复
热议问题