[Scons-users] Glob and **

Russel Winder russel at winder.org.uk
Sat Jun 6 11:09:52 EDT 2020


On Sat, 2020-06-06 at 07:05 -0600, Mats Wichmann wrote:
> On 6/6/20 4:22 AM, Russel Winder wrote:
> > Hi,
> > 
> > Glob('**/*.d') works as it says on the can. However what I want is the set
> > of
> > .d files in the source sub-tree. So Glob('source/*.d') is not up to the
> > task
> > and Glob('source/**/*.d') doesn't work. Am I missing something simple?
> 
> What does it say on the can? If you mean Python's recursive globbing
> with ** from glob.glob, the SCons Glob was adapted from glob.glob long
> before that existed (Py docs say that syntax was introduced in 3.5) and
> it doesn't appear to have any support for it. Might not be a bad feature
> request?
> 
> Or did you mean something else?

I should have done a bit more experimenting before posting. The solution is:

Glob('source/*.d') + Glob('source/**/*.d')

Sorry for the wasted post. Thanks for the response – it made me check!

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200606/d2eee7d3/attachment.sig>


More information about the Scons-users mailing list