[Python-ideas] Adding '**' recursive search to glob.glob

Paul Moore p.f.moore at gmail.com
Mon Jan 14 17:41:46 CET 2013


On 14 January 2013 16:33, Serhiy Storchaka <storchaka at gmail.com> wrote:
> On 14.01.13 18:25, Paul Moore wrote:
>> Hmm, from my experiments, bash doesn't show a/b as matching the
>> pattern a/**/b ...
>
> $ shopt -s globstar
> $ echo Lib/**/test
> Lib/ctypes/test Lib/sqlite3/test Lib/test Lib/tkinter/test Lib/unittest/test

Ah, thanks. I hadn't enabled globstar. See what happens when you let a
Windows user near a Unix shell? :-) And the fact that globstar is an
option gives some weight to having a globstar-like flag in the
function signature.

Sorry for the noise.
Paul.



More information about the Python-ideas mailing list