Calling `du` is possible but I prefer to avoid these kinds of solutions.
(OS-specific, parsing text output from a third-party program.)

On Wed, May 3, 2017 at 1:57 AM, Cameron Simpson <c...@zip.com.au> wrote:

> On 02May2017 22:07, Ram Rachum <r...@rachum.com> wrote:
>
>> I have a suggestion: Add a function shutil.get_dir_size that gets the size
>> of a directory, including all the items inside it recursively. I currently
>> need this functionality and it looks like I'll have to write my own
>> function for it.
>>
>
> Feels like a rather niche function. Had you considered just calling "du"
> via subprocess and reading the number it returns?
>
> Cheers,
> Cameron Simpson <c...@zip.com.au>
>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to