You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand it, the only way to programmatically modify code is with IJulia.load_string. It seems that if a function using this is registered as a preexecution hook, it modifies the cell as expected, but only after running the unmodified code. JupyterFormatter is where I first noticed this behavior, and it's source is a nearly minimal example of the workflow I'm describing.
It would be really nice to be able to modify the code, and then execute it immediately, without running the cell twice. Is this possible, or it is a limitation of the way Jupyter works?
The text was updated successfully, but these errors were encountered:
It's the way Jupyter works — it sends us the code to be executed, at which point we execute the hooks, but at that point it has already sent us the old code.
As I understand it, the only way to programmatically modify code is with
IJulia.load_string
. It seems that if a function using this is registered as a preexecution hook, it modifies the cell as expected, but only after running the unmodified code. JupyterFormatter is where I first noticed this behavior, and it's source is a nearly minimal example of the workflow I'm describing.It would be really nice to be able to modify the code, and then execute it immediately, without running the cell twice. Is this possible, or it is a limitation of the way Jupyter works?
The text was updated successfully, but these errors were encountered: