[Scons-users] "${xxx}" problem in env.Textfile source string

Daniel Moody dmoody256 at gmail.com
Thu May 5 11:41:39 EDT 2022


double dollar sign worked for me, this was my test:

env = Environment(tools=['textfile'])
env.Textfile('out.txt',
    '$${workspaceRoot}\\myPath'
)

out.txt:
${workspaceRoot}\myPath

On Thu, May 5, 2022 at 10:27 AM Mats Wichmann <mats at wichmann.us> wrote:

> On 5/5/22 09:23, liruncong2018 via Scons-users wrote:
> > Hello Mats Wichmann,
> > I replaced "${workspaceRoot}" with "$${workspaceRoot}" and it still
> > doesn't work, is it related to "{" and "}"?
>
> shouldn't be.... the doubled $$ should turn off interpretation of the
> variable reference, whether it's wrapped in {} or not.   Sometimes there
> are so many layers of substitution that things are more complex... we'll
> see if anyone else has ideas.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220505/3cb4560d/attachment.htm>


More information about the Scons-users mailing list