How to find out about free space on a given drive?
Steve Purcell
stephen_purcell at yahoo.com
Mon Mar 19 03:51:56 EST 2001
Dinu Gherman wrote:
> is there a simple way (or any way at all) to find out for
> any given hard disk how much free space is left on that
> device? I looked into the os module, but either not hard
> enough or there is no such function. Of course, the ideal
> solution would be platform-independant, too... :)
os.statvfs() seems to be what you want for UNIX. I don't think you'll find
a cross-platform solution.
-Steve
--
Steve Purcell, Pythangelist
Get testing at http://pyunit.sourceforge.net/
Any opinions expressed herein are my own and not necessarily those of Yahoo
More information about the Python-list
mailing list