Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: runcell trigger post_execute before run_cell to end the run_cell pre_execute #58

Merged
merged 2 commits into from
Oct 19, 2018

Conversation

bcolsen
Copy link
Member

@bcolsen bcolsen commented Oct 18, 2018

As discussed here:
spyder-ide/spyder#7310

This is the simple fix:

ipython_shell.events.trigger('post_execute')
ipython_shell.run_cell(cell_code)

Pull request coming to spyder-kernels.

The new runcell command runs the pre-execution trigger 3 times (and now closes twice) before every execution, but I don't notice any performance hit.

@ccordoba12 ccordoba12 changed the title RunCell Trigger post_execute before run_cell to end the run_cell pre_execute PR: RunCell Trigger post_execute before run_cell to end the run_cell pre_execute Oct 19, 2018
@ccordoba12 ccordoba12 changed the title PR: RunCell Trigger post_execute before run_cell to end the run_cell pre_execute PR: runcell trigger post_execute before run_cell to end the run_cell pre_execute Oct 19, 2018
@ccordoba12 ccordoba12 added this to the v1.2 milestone Oct 19, 2018
@@ -711,6 +711,11 @@ def runcell(cellname, filename):
"Please use only through Spyder's Editor; "
"shouldn't be called manually from the console")
return

# Trigger `post_execute` to exit the additional pre-execution.
# See spyder #7310.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add issue here to be easily grep-able, i.e.

See Spyder issue #7310

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since #7310 is a pull request, would be be better as:

See Spyder pull request #7310

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't know that. Let's use then PR #7310.

@ccordoba12 ccordoba12 merged commit f9e0329 into spyder-ide:master Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants