I have installed python 2.7 and trying to run below code which always gives error:
# !/usr/bin/python
import os, sys
stinfo = os.statvfs("C:\Tools")
And error comes as :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'statvfs'
Any clue to make it work?
I'm assuming from your example file path that you're using Windows.
The os.statvfs() call is not supported in Windows. An attempt to add support was made, but was rejected.
You might find this answer helpful for possible solutions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With