发布时间:2019-08-27 08:03:04编辑:auto阅读(2766)
import ctypes
import os
lpBuffer = ctypes.create_string_buffer(78)
ctypes.windll.kernel32.GetLogicalDriveStringsA(ctypes.sizeof(lpBuffer), lpBuffer)
vol = lpBuffer.raw.split('\x00')
for i in vol:
print i
#遍历字母A到Z,忽略光驱的盘符
for i in range(65,91):
vol = chr(i) + ':'
if os.path.isdir(vol):
print vol
上一篇: leetcode 241. Differ
下一篇: Python升级导致yum命令不能使用
51560
51132
41658
38415
32901
29877
28594
23554
23486
21832
1981°
2687°
2250°
2178°
2628°
2193°
2944°
4873°
4701°
3350°