Closed aroberge closed 6 years ago
This issue, as described, is no longer needed: in https://github.com/aroberge/reeborg/blob/master/src/python/common.py, where the Python code gets executed, I have added the following:
if window.RUR.state.done_executed:
try:
exec(post_code, globals_)
except Exception as e:
window.RUR.__python_error = e
Currently, if code is included in the Post editor, a world creator has to explicitly disable
done()
to prevent a user from having a program bypass the Post editor. However, if the user's code includedone()
is likely going to be redefined to its basic value.What should be done is the following
RUR.confirm_post()
+ Post which would set up a flag.If Post code is present but not executed, an error message should be displayed, something like "This world included some code which was meant to run after the user's program but which has been prevented from running."
Make sure that this works for
done()
when used at the REPL.done
done
redefinition