开发者

Get each partition information with Python

How do you get all partitions and their info (total space, free space etc.) with Python on Windows? Thi example shows how to get free space, but you must know partitions/folders... I would like to get info for all partitions 开发者_Go百科(maybe except CD-ROMs).


Check out the WMI module. There are many recipes in the WMI cookbook, including

  • Find Drive Types
  • Show the percentage free space for each fixed disk
  • Show disk partitions
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜