mirror of
https://github.com/Relintai/scons_gd.git
synced 2025-03-26 19:32:22 +01:00
26 lines
719 B
Groff
26 lines
719 B
Groff
DefaultEnvironment(tools=[])
|
|
|
|
textlist = ['This line has no substitutions',
|
|
'This line has @subst@ substitutions',
|
|
'This line has %subst% substitutions',
|
|
]
|
|
|
|
sub1 = {'@subst@': 'most'}
|
|
sub2 = {'%subst%': 'many'}
|
|
sub3 = {'@subst@': 'most', '%subst%': 'many'}
|
|
|
|
env = Environment(tools=['textfile'])
|
|
|
|
t = env.Textfile('text', textlist)
|
|
# no substitutions
|
|
s = env.Substfile('sub1', t)
|
|
# one substitution
|
|
s = env.Substfile('sub2', s, SUBST_DICT=sub1)
|
|
# the other substution
|
|
s = env.Substfile('sub3', s, SUBST_DICT=sub2)
|
|
# the reverse direction
|
|
s = env.Substfile('sub4', t, SUBST_DICT=sub2)
|
|
s = env.Substfile('sub5', s, SUBST_DICT=sub1)
|
|
# both
|
|
s = env.Substfile('sub6', t, SUBST_DICT=sub3)
|