import glob import os import string env = Environment() def src_glob (s): here = os.getcwd() os.chdir (env.Dir ('.').srcnode ().abspath) result = glob.glob (s) os.chdir (here) return result Program("foobar", src_glob("*.c"))