Open hoangKnLai opened 1 year ago
[Notebook API]() may provide a path to:
@hoangKnLai a few questions about the Notebook API:
Ideally, you would want something that replicates the Spyder editor->REPL workflow exactly.
Yes. The REPL behavior is what we wanted. I think IPython
does this in two ways:
stdstream
ipython kernel
can be created and queried
qtconsole
and Spyder uses this one. Spyder uses a qtconsole for the integrated terminal instead of the ipython terminal, which provides in-line plotting and other features. Is it possible to implement anything like that in VSCode? or is the fact that qtconsole is a GUI app prevent us from doing that?
About a year back, I looked briefly into the qtconsole
:
qt
API for typescript/javascript
is not a thing. If it is, we likely can trigger qt-event for the qtconsole to use. qtconsole
communicate via some IP socket which is slow when compare to current sent text. qtconsole
rendering (e.g., a code snippet can be ran on its kernel, but I couldn't find a way for it to print the In [ ] / Out [ ])
of a command.qtconsole
directly since it is built in qt-python
hookIs there any way for VSCode to communicate with an external terminal?
There might be one. Similar to a language server, the @vscode/python-extension
provides a tunnel between vscode
and python
. Hence this issue to find the way. An approach might be:
ipython
service server via the python-extension
option
So the main idea stems from the fact that vscode notebook can already render the ipython
kernel inputs and outputs including the inline plots that the current text terminal can't. All we do is likely managing the various kernel, the number of notebook cells, and what is being render.
See python-extension-template for
ipython
via direct usage