Page 1 of 1

EXEC_FLAG_PRINT_EOF prints 2 EOF chars: 1 after normal output, 1 after exception output

Posted: Thu Jan 11, 2018 9:52 pm
by jickster

Code: Select all

// EXEC_FLAG_PRINT_EOF prints 2 EOF chars: 1 after normal output, 1 after exception output
What is the use of this?
Also, comment is incorrect: during normal output, it outputs two EOF chars.

https://github.com/micropython/micropyt ... c#L62-L151

Re: EXEC_FLAG_PRINT_EOF prints 2 EOF chars: 1 after normal output, 1 after exception output

Posted: Thu Jan 11, 2018 10:28 pm
by dhylands
This has to do with the raw REPL which is where code is uploaded to the board, but the uploading of the characters is not echoed back.

This is used by pyboard.py, which is used as part of the test suite. Snippets of code are uploaded and they either execute correctly, or cause an exception to be raised. In either case we want to know that the code is "done". Otherwise it would just hang there waiting forever without knowing if more output was coming or not.

I'd agree that the comment is slightly misleading.