美文网首页
python3 判断磁盘存储使用情况

python3 判断磁盘存储使用情况

作者: a50426d44eac | 来源:发表于2019-01-02 11:23 被阅读0次
    
    import shutil
    
    total, used, free = shutil.disk_usage("\\")
    
    print("Total: %d GB" % (total // (2**30)))
    
    print("Used: %d GB" % (used // (2**30)))
    
    print("Free: %d GB" % (free // (2**30)))
    
    

    相关文章

      网友评论

          本文标题:python3 判断磁盘存储使用情况

          本文链接:https://www.haomeiwen.com/subject/jctzlqtx.html