Closed Woazboat closed 1 year ago
I'm not exactly sure how I can fix this. If I escape the single quotes, there's still an error. The only solution appears to be using double quotes in the print("foo")
or whatever is being executed.
PS C:\Users\Dave\Desktop\NeoPixel> py.exe -m mpremote connect COM7 exec 'print('foo')'
Traceback (most recent call last):
File "<stdin>", line 2
SyntaxError: invalid syntax
PS C:\Users\Dave\Desktop\NeoPixel> py.exe -m mpremote connect COM7 exec 'print(\'foo\')'
Traceback (most recent call last):
File "<stdin>", line 2
SyntaxError: invalid syntax
PS C:\Users\Dave\Desktop\NeoPixel> py.exe -m mpremote connect COM7 exec 'print("foo")'
foo
Fixing for one style of quoting breaks it for the other.
Single quotes
'
in commands are not escaped correctlyprint('foo')
python -m mpremote connect /dev/ttyACM0 exec 'print('foo')'
print("foo")
python -m mpremote connect /dev/ttyACM0 exec 'print("foo")'