Python 获取电脑桌面路径

def get_desktop():
    key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,
                              r'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders')
    return winreg.QueryValueEx(key, "Desktop")[0]

你可能感兴趣的:(Python日常技巧,python,windows,开发语言)