gpt4 book ai didi

python-2.7 - Python2.7 上的 Os.statvfs 问题

转载 作者:行者123 更新时间:2023-12-01 00:33:55 25 4
gpt4 key购买 nike

我已经安装了 python 2.7 并尝试在下面的代码下运行,但总是报错:

# !/usr/bin/python

import os, sys

stinfo = os.statvfs("C:\Tools")

错误如下:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'statvfs'

有什么线索可以让它发挥作用吗?

最佳答案

根据您的示例文件路径,我假设您使用的是 Windows。

os.statvfs() Windows 不支持调用。已尝试添加支持,但失败了 rejected .

您可能会发现这个 answer有助于可能的解决方案。

关于python-2.7 - Python2.7 上的 Os.statvfs 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15100987/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com