Replies: 2 comments 3 replies
-
Hi, this is not possible, but you can install jupyter-console via pip and then use the following repl definition:
The option I had a look today at https://github.com/jupyter-vim/jupyter-vim. They open qtconsole in an extra window and attach it to the jupyter-console kernel. I can do now the same and can see the repl output like images in qtconsole while sending with iron code from my buffer to the python-console in the nvim buffer. This works even, if the iron buffer is hidden. Just start the repl in iron and then in a different terminal run |
Beta Was this translation helpful? Give feedback.
-
@txnf I was able to execute multiple lines in one "cell" by using python = {
command = { "ipython", "--no-autoindent" },
format = require("iron.fts.common").bracketed_paste
} I don't know if it's a bug, or if it should work that way... Only issue is it sends everything as a single cell and so the output is a giant blob with no correlation back to the original code. And, I prefer cell-per-line (using def elementwiseMult():
pricesRow = torch.tensor([5, 1.5, 2])
costsPerItem = orders * pricesRow
expectedCostsPerItem = torch.tensor([
[5,3,6],
[0,3,0],
[0,0,2],
], dtype=torch.float16)
np.testing.assert_array_equal(costsPerItem, expectedCostsPerItem)
elementwiseMult() Bonus for using a func is you can stop executing on a failure, whereas I haven't found a way to do that with the cell-per-line style... I imagine that would require OSC codes specific to the REPL and they'd need to be emitted on a failure and picked up with a TermRequest event. Hope it helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
in ipython when I send a cell or block of lines to terminal with repl_send_motion, it always send the block and evaluates it one line at a time.. Is there a way to make it send it to ipython, or to format it so that ipython will evaluate it as a single block?
Thank you
Example below:
I get:
I wish that it would evaluate it as one block instead.
Beta Was this translation helpful? Give feedback.
All reactions