[Scons-users] changing the build directory

Russel Winder russel at winder.org.uk
Tue Mar 12 07:42:06 EDT 2013


On Tue, 2013-03-12 at 11:08 +0100, Brady Johnson wrote:

> Ive seen several people on Stack Overflow ask about a recursive Glob. I too

> think it would be a great addition. Should it return a generator, or just a

> list of Nodes? Perhaps both would be useful.


I have to admit to not doing much with StackOverflow, the name says it
all really ;-)

The emphasis in Python 3 is on being as lazy as possible so much more
use of generators. If you want the data structure you ask for it
explicitly. So for me:

RGlob('*.groovy')

would return a generator, and:

tuple(RGlob('*.groovy'))

would be the tuple derived from it.

An alternative design would be to use a recursive globbing syntax int he
Glob and not have an RGlob at all. So, following Ant-like syntax:

Glob('**/*.groovy')

would be the recursive form. This has the advantage of only needing
changes to the Glob system. I am beginning to prefer this solution.

--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : <http://four.pairlist.net/pipermail/scons-users/attachments/20130312/855bfdec/attachment-0001.pgp>


More information about the Scons-users mailing list