python 获取桌面路径
import _winreg as winreg def get_desktop(): key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders') return winreg.QueryValueEx(key, "Desktop")[0]
骑着毛驴看日出
import _winreg as winreg def get_desktop(): key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders') return winreg.QueryValueEx(key, "Desktop")[0]