stm32loader icon indicating copy to clipboard operation
stm32loader copied to clipboard

'print' - what can be wrong??

Open XuTpuK opened this issue 8 years ago • 5 comments

When I run script, on line 241 it says "invalid syntax"! It's simplistic "print" operator, what can be wrong??

XuTpuK avatar May 20 '17 22:05 XuTpuK

It's Python 2 syntax. Use it to start the script.

kuraga avatar May 25 '17 21:05 kuraga

Heh... use it - what? Can I just modify operator to work in Py3? (cannot believe so simplistic function has 'breaking changes'!)

XuTpuK avatar May 29 '17 15:05 XuTpuK

print 'string' -> print('string')

kuraga avatar May 31 '17 15:05 kuraga

@XuTpuK You have to use Python version 2 to run the script. You are using Python 3.

@kuraga That will fix the syntax error, but it's not enough to get it working on Python 3.

If you only have Python 3, please use this version: https://github.com/florisla/stm32loader

florisla avatar Mar 07 '18 10:03 florisla

Solved my issue!! Seems Ubuntu 20.04 only came with Py3. Thanks for the link!

Carbon18 avatar May 13 '20 14:05 Carbon18