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

notebook 2-way interaction #133

Open
razcore-rad opened this issue Jul 3, 2015 · 4 comments
Open

notebook 2-way interaction #133

razcore-rad opened this issue Jul 3, 2015 · 4 comments

Comments

@razcore-rad
Copy link

So I use a lot python for matplotlib. Is it possible to somehow make the notebook react to executed commands on the kernel? So basically is there a way to update the notebook as code is run in vim? This would be particularly useful with %matplotlib inline...

@razcore-rad
Copy link
Author

I realize now this is more of an issue for the notebook developers cause they would need to implement an update cycle based on kernel updates...

@florian-wagner
Copy link

I agree that this would be an awesome feature.

@razcore-rad
Copy link
Author

Well, the only way I can see this can work at the moment is to do whatever calculation in vim-ipython, then after plotting, go in the notebook and run a cell with In[-2]. Haven't tried it yet, but if that should be the last command executed in the kernel and if that's a plotting command that comes after %matpotlib inline then you should get the plot back. Haven't tried it yet though.

@razcore-rad
Copy link
Author

OK... so after some spent time fiddling around, I see how this can work as is, although it would be nice to have it implemented some day in an automatic fashion.

So if you connect to the kernel with vim-ipython or anything else for that matter you can get the last commands sent to the kernel with the %rerun magic command. Now I've only tried this with ipython 3.2 but my workflow is like this now. I connect with vim-ipython to the kernel and whenever I need to inspect something while I build the script I run the appropriate code with <c-s> then just switch to the browser and execute %rerun which gives me exactly what I want :).

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

No branches or pull requests

2 participants