import os

my_temp_dir = os.path.join(os.getcwd(), 'my_temp_files')

env = Environment(
    BUILDCOM='${TEMPFILE("xxx.py $TARGET $SOURCES")}',
    MAXLINELENGTH=16,
    TEMPFILEDIR=my_temp_dir,
)
env.AppendENVPath('PATH', os.curdir)
env.Command('foo.out', 'foo.in', '$BUILDCOM')

plain_env = Environment(
    BUILDCOM='${TEMPFILE("xxx.py $TARGET $SOURCES")}',
    MAXLINELENGTH=16,
)
plain_env.Command('global_foo.out', 'foo.in', '$BUILDCOM')
