Todo: 集成多平台 解决因SaiNiu线程抢占资源问题 本地提交测试环境打包 和 正式打包脚本与正式环境打包bat 提交Python32环境包 改进多日志文件生成情况修改打包日志细节
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from win32com.shell import shell
|
||||
from win32com.shell.shellcon import *
|
||||
|
||||
sf = shell.SHGetDesktopFolder()
|
||||
print("Shell Folder is", sf)
|
||||
|
||||
names = []
|
||||
for i in sf: # Magically calls EnumObjects
|
||||
name = sf.GetDisplayNameOf(i, SHGDN_NORMAL)
|
||||
names.append(name)
|
||||
|
||||
# And get the enumerator manually
|
||||
enum = sf.EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN)
|
||||
num = 0
|
||||
for i in enum:
|
||||
num += 1
|
||||
if num != len(names):
|
||||
print("Should have got the same number of names!?")
|
||||
print("Found", len(names), "items on the desktop")
|
||||
for name in names:
|
||||
print(name)
|
||||
Reference in New Issue
Block a user