[Scons-users] py3: string_escape?

Tim Jenness tjenness at lsst.org
Tue Oct 10 22:04:05 EDT 2017


This may help you: https://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python <https://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python>



> On Oct 10, 2017, at 18:50 , Mats Wichmann <mats at wichmann.us> wrote:
> 
> 
> I finally tried our project, which now works with scons 3.0, using
> Python 3 as well. Shock (sarcasm): it failed.
> 
> scons: Reading SConscript files ...
> LookupError: unknown encoding: string_escape:
>  File "/home/mats/iotivity.work/SConstruct", line 28:
>    SConscript('build_common/SConscript')
>  File
> "/home/mats/virtualenv/scons3-py3/lib/python3.6/site-packages/scons-3.0.0/SCons/Script/SConscript.py",
> line 607:
>    return method(*args, **kw)
>  File
> "/home/mats/virtualenv/scons3-py3/lib/python3.6/site-packages/scons-3.0.0/SCons/Script/SConscript.py",
> line 544:
>    return _SConscript(self.fs, *files, **subst_kw)
>  File
> "/home/mats/virtualenv/scons3-py3/lib/python3.6/site-packages/scons-3.0.0/SCons/Script/SConscript.py",
> line 253:
>    call_stack[-1].globals)
>  File "/home/mats/iotivity.work/build_common/SConscript", line 556:
>    user_prefix = env.get('BUILD_DIR').encode('string_escape')
> 
> 
> This was not something I expected, the experiment with conversion tools
> hadn't suggested a problem here (unless I missed it). Of course, I also
> didn't expect that some dev wasn't happy with fetching a string from the
> environment without having to apply extra fiddling to it, either.  If I
> change that to 'unicode_escape', have I caused problems for using the
> project with Py2?  Is it better to just chop off the encode method call?
> _______________________________________________
> 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/20171010/470e4b57/attachment.html>


More information about the Scons-users mailing list