check disc space
T. Schulz
thomas at esands.com
Thu Dec 11 23:56:38 EST 2003
>
> But "if estimated_space > int(free_space * 1.05): ..." might not be
> such a bad thing when there is no other route to sanity available.
I support that.
In my current project, I know that I get 1GB of data during the next 15
minutes or so. I would like to make sure that there is enough space
available.
We develop on Linux but support Windows as well.
Certainly we get there if we use os.statvfs here and
win32api.GetDiskFree there. But I belive the question is quite common
and why shouldn't there be a os independent abstraction? Specially since
almost all current hardware uses some kind of file system to store things.
Thomas
More information about the Python-list
mailing list