[Scons-users] "posix" variable modifier doesn't exist?

Bill Deegan bill at baddogconsulting.com
Sat Jul 18 16:48:41 EDT 2020


Which version of SCons? which version of Python? Which operating system?

On Sat, Jul 18, 2020 at 4:35 AM Damjan Jovanovic <damjan.jov at gmail.com>
wrote:

> Hi
>
> The man page claims how there's a variable substitution modifier called
> "posix":
>
> *posix* - The path with directories separated by forward slashes (*/*).
> Sometimes necessary on Windows systems when a path references a file on
> other (POSIX) systems.
>
> However it doesn't work:
>
> env = Environment()
> env['path1'] = Dir('src/images')
> env['path2'] = env.subst('${path1.posix}')
>
> scons: *** AttributeError `<class 'SCons.Node.FS.Dir'> object has no
> attribute 'posix'' trying to evaluate `${path1.posix}'
>
> I can use ${str(path1).replace('\\\\', '/')} but is there a better way?
>
> Thank you
> Damjan
>
> _______________________________________________
> 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/20200718/c6b9c876/attachment-0001.html>


More information about the Scons-users mailing list