A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-March/013727.html below:

[Python-Dev] Function in os module for available disk space, why not?

[Python-Dev] Function in os module for available disk space, why not?Dinu Gherman gherman@darwin.in-berlin.de
Mon, 19 Mar 2001 16:32:51 +0100
Gordon McMillan wrote:
> 
> Considering that:
>  - it's not uncommon to map things into the filesystem's
>    namespace for which "free space" is meaningless

Unless I'm totally stupid, I see the concept of "free space" as
being tied to the *device*, not to anything being mapped to it 
or not.

>  - for network mapped storage space it's quite likely you can't
>    get a meaningful number

Fine, then let's play the exception blues...

>  - for compressed file systems the number will be inaccurate

Then why is the OS function call there...? And: nobody can *seri-
ously* expect an accurate figure of the remaining space for com-
pressed file systems, anyway, and I think nobody does! But there
will always be some number >= 0 of uncompressed available bytes 
left.

>  - even if you get an accurate answer, the space may not be
>    there when you go to use it (so need try... except anyway)

The same holds for open(path, 'w') - and still this function is 
considered useful, isn't it?!

> I find it perfectly sensible that Python does not dignify this
> mess with an official function.

Well, I have yet to see a good argument against this...

Regards,

Dinu



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4