scad_tokens.py:55: SyntaxWarning: invalid escape sequence '\&'
andyDoucette opened this issue · 3 comments
andyDoucette commented
A script to reproduce using this version of BOSL2.
fill.py
#!/usr/bin/python3
from solid import *
b2=include('BOSL2/std.scad')[andromodon@spectre fill]$ ./fill.py
/usr/local/lib/python3.12/dist-packages/solid/py_scadparser/scad_tokens.py:55: SyntaxWarning: invalid escape sequence '\&'
t_AND = "\&\&"
/usr/local/lib/python3.12/dist-packages/solid/py_scadparser/scad_tokens.py:56: SyntaxWarning: invalid escape sequence '\|'
t_OR = "\|\|"The fix is to modify scad_tokens.py and change these lines to this:
t_AND = r"\&\&"
t_OR = r"\|\|"
jeff-dh commented
Especially if you want to use bosl2, you might want to have a look at
SolidPython2:
https://github.com/jeff-dh/SolidPython
https://github.com/jeff-dh/SolidPython/blob/master-2.0.0-beta-dev/solid2/examples/07-libs-bosl2-logo.py
https://github.com/jeff-dh/SolidPython/blob/master-2.0.0-beta-dev/solid2/examples/07-libs-bosl2.py
Even though it might have the same issues (the raw strings).
andyDoucette commented
Thank you! I'm a little confused about what's solidpython2 and what's
solidpython. There are lots of places where the names are used
interchangeably, it seems. Can you clarify? Why change the name instead
of just having a version?
…On Mon, Feb 3, 2025, 8:04 PM jeff ***@***.***> wrote:
Especially if you want to use bosl2, you might want to have a look at
SolidPython2:
https://github.com/jeff-dh/SolidPython
https://github.com/jeff-dh/SolidPython/blob/master-2.0.0-beta-dev/solid2/examples/07-libs-bosl2-logo.py
https://github.com/jeff-dh/SolidPython/blob/master-2.0.0-beta-dev/solid2/examples/07-libs-bosl2.py
Even though it might have the same issues (the raw strings).
—
Reply to this email directly, view it on GitHub
<#214 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEVLQ5U2SWVJ3KFB66N5EQ32N5LNRAVCNFSM6AAAAABWJGFBWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZQG42TOMZQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>