[Scons-users] Glob versus glob
Peter Steele
pwsteele at gmail.com
Fri Sep 7 10:10:50 EDT 2012
I have the statements
env.VariantDir('obj', 'src', duplicate=0)
sources = [file.replace("src/", "obj/") for file in
glob("src/*.c")+glob("src/fw/*.c")+glob("src/fw/proxy/*.c")]
that I use to keep my object files separate from my source files. I noticed
that there was a Glob scons command so I thought I could use this instead of
having to import glob.glob. I change my code to use
sources = [file.replace("src/", "obj/") for file in
Glob("src/*.c")+Glob("src/fw/*.c")+Glob("src/fw/proxy/*.c")]
because Glob doesn't return a string some scons class object. I was
wondering what would be the most straightforward scons way to use Glob and
apply the same string operation to the list that's returned?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20120907/772d10b9/attachment.html>
More information about the Scons-users
mailing list