[Python-ideas] Adding `pathlib.Path` method that would send file to recycle bin

random832 at fastmail.us random832 at fastmail.us
Mon Jan 5 02:40:16 CET 2015


On Sun, Jan 4, 2015, at 20:31, Steven D'Aprano wrote:
> I think you are mistaken that nothing uses glob:

I am very confident in saying that programs that do not use glob _to
process lists of filenames given on the command line_ outnumber those
that do at least 1000:1, and that the vast majority of your search
consists of uses for processing things other than command line
arguments.

> https://searchcode.com/?q=import+glob+lang%3Apython

The vast majority of results (I used
https://searchcode.com/?q=glob.glob+lang%3Apython so I could see the
actual call in context) are using it for hardcoded strings, not command
line arguments (and to do it correctly they should do even that
conditionally on os.name == 'nt' [or os2 or ce, not sure about the other
non-posix values])


More information about the Python-ideas mailing list