SolidCode/SolidPython

scad_tokens.py:55: SyntaxWarning: invalid escape sequence '\&'

andyDoucette opened this issue · 3 comments

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"\|\|"