[Scons-users] Glob
Russel Winder
russel at winder.org.uk
Sat Mar 8 13:27:41 EST 2014
I want to avoid explicitly listing source files. The source directory
contains all the files so Glob('*.cc') seems reasonably. However 1 of
the .cc files should not be included, is is the one source file for the
second executable. I thought I'd be clever and try:
Glob('*.cc').remove(Glob('specialSourceFile.cc')[0])
but sadly this fails to work. I printed out the full glob and the
special glob:
[<SCons.Node.FS.File object at 0x7f121d76bf50>, <SCons.Node.FS.File
object at 0x7f121d77b610>, <SCons.Node.FS.File object at
0x7f121d75b410>, <SCons.Node.FS.File object at 0x7f121d75b510>,
<SCons.Node.FS.File object at 0x7f121d7b2a50>, <SCons.Node.FS.File
object at 0x7f121d76b610>, <SCons.Node.FS.File object at
0x7f121d77ba50>, <SCons.Node.FS.File object at 0x7f121d75b1d0>,
<SCons.Node.FS.File object at 0x7f121d7b2dd0>, <SCons.Node.FS.File
object at 0x7f121d75ba90>, <SCons.Node.FS.File object at
0x7f121d7c3dd0>, <SCons.Node.FS.File object at 0x7f121d75be10>,
<SCons.Node.FS.File object at 0x7f121d7b27d0>, <SCons.Node.FS.File
object at 0x7f121d76b2d0>, <SCons.Node.FS.File object at
0x7f121d77b490>, <SCons.Node.FS.File object at 0x7f121d7bcd10>,
<SCons.Node.FS.File object at 0x7f121d7c3810>, <SCons.Node.FS.File
object at 0x7f121d7c3f10>, <SCons.Node.FS.File object at
0x7f121d76b7d0>, <SCons.Node.FS.File object at 0x7f121d75b8d0>,
<SCons.Node.FS.File object at 0x7f121d7c3c90>, <SCons.Node.FS.File
object at 0x7f121d75bfd0>, <SCons.Node.FS.File object at
0x7f121d7bcad0>, <SCons.Node.FS.File object at 0x7f121d7c3a50>,
<SCons.Node.FS.File object at 0x7f121d76b450>, <SCons.Node.FS.File
object at 0x7f121d7b26d0>, <SCons.Node.FS.File object at
0x7f121d76be10>, <SCons.Node.FS.File object at 0x7f121d75be90>,
<SCons.Node.FS.File object at 0x7f121d7c3690>, <SCons.Node.FS.File
object at 0x7f121d77b390>, <SCons.Node.FS.File object at
0x7f121d76b910>, <SCons.Node.FS.File object at 0x7f121d76bc90>,
<SCons.Node.FS.File object at 0x7f121d77b750>, <SCons.Node.FS.File
object at 0x7f121d75b650>, <SCons.Node.FS.File object at
0x7f121d77b8d0>, <SCons.Node.FS.File object at 0x7f121d76b150>,
<SCons.Node.FS.File object at 0x7f121d76bb90>, <SCons.Node.FS.File
object at 0x7f121d7c34d0>, <SCons.Node.FS.File object at
0x7f121d7c3410>, <SCons.Node.FS.File object at 0x7f121d75bcd0>,
<SCons.Node.FS.File object at 0x7f121d7c3b50>, <SCons.Node.FS.File
object at 0x7f121d7c3190>, <SCons.Node.FS.File object at
0x7f121d75bb50>, <SCons.Node.FS.File object at 0x7f121d7b2ad0>,
<SCons.Node.FS.File object at 0x7f121d77b110>]
[<SCons.Node.FS.File object at 0x7f121d77b750>]
AttributeError: 'NoneType' object has no attribute 'name':
So I guess the question is how to have what appears to be lists of
SCons.Node.FS.File fit with the list operations?
--
Russel.
==============================================================================
Dr Russel Winder Director
It'z Interactive Ltd 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.itzinteractive.com skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
Url : http://four.pairlist.net/pipermail/scons-users/attachments/20140308/36cc3fda/attachment-0001.pgp
More information about the Scons-users
mailing list