当前位置:编程学习 > python >>

python获取当前系统的桌面的路径

也需要win32扩展,原理不懂

from win32com.shell import shell, shellcon
def GetDesktopPath():
    ilist = shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_DESKTOP)
    return shell.SHGetPathFromIDList(ilist)

补充:Php教程,Php入门
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,