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]

 

posted on 2015-06-01 17:42  毛驴居然被用了  阅读(732)  评论(0编辑  收藏  举报

导航