I'm fairly certain that this is because !!python\n is prepended to the script input in the interpreter. There's the hacky fix of subtracting 1 from the line count, but it would be a lot nicer to update the parser to obviate the need for manually inserting the !!python.
Easiest report case: create an aipl file with a single line and command,
!abort
. Running it will yield:I'm fairly certain that this is because
!!python\n
is prepended to the script input in the interpreter. There's the hacky fix of subtracting 1 from the line count, but it would be a lot nicer to update the parser to obviate the need for manually inserting the!!python
.