F9 execution of scirpt lines
photoniker opened this issue · 1 comments
photoniker commented
The following script can of course be executed without any problems.
`mot = actuator("DummyMotor")
for _idx in range(5):
pos = 1
mot.setPosRel(0, pos)
#
`
But If the for loop is marked and executed by F9 a SyntaxError is shown in command line:
>>for _idx in range(5): pos = 1 mot.setPosRel(0, pos) # File "<string>", line 4 # SyntaxError: invalid syntax
magro11 commented
The python interpreter does not accept to execute a single command, which is a comment only and it seems, that a comment in the last line is also not accepted. This is not only about F9 executions, but also when the command is run or debugged from the command line. In the latter case, an empty line will be appended before executing it.