Hi,
You need to create another Spyder plugin that uses the Spyder-notebook
API in the programmatic way you need.
To learn how to write plugins for Spyder, we have this tutorial
<http://docs.spyder-ide.org/current/workshops/plugin-development.html>.
It’s a bit outdated, so you’ll also need to check how our latest plugins
are implemented in the main Spyder repo.
And Spyder-notebook API is quite simple: it exposes a single method
called open_notebook
<https://github.com/spyder-ide/spyder-notebook/blob/f750c4656a84208845bd5cff1f982345c280baa1/spyder_notebook/notebookplugin.py#L84-L85>,
which does exactly what you want when receiving a list of filenames.
Cheers,
Carlos
El 11/11/22 a las 19:40, Rich Lysakowski escribió:
I am creating Jupyter Notebooks programmatically after scraping
HTML-embedded Python code.
I want to automatically (programmatically) launch Spyder-Notebook and
open the ".ipynb" file that was just created in my script.
I want to be able to follow the "nbopen" protocol:
1) Test if there is an existing Spyder-Notebook (Jupyter?) server
started by Spyder.
2) If the test result in 1) is False, then launch Spyder-Notebook
3) Pass in the NB filename, Open Spyder-Notebook, i.e., like
"File...Open..."
4) Display NB in Spyder-Notebook
What API call(s) do I have to use to test if Spyder-Notebook is
already running, and then open the Jupyter NB with that Jupyter
server, or launch a new server if Spyder-Notebook is not already running.
Thank you.
Rich Lysakowski
--
You received this message because you are subscribed to the Google
Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to spyderlib+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/spyderlib/0cf528f2-d582-4c6b-9674-0a66934051adn%40googlegroups.com
<https://groups.google.com/d/msgid/spyderlib/0cf528f2-d582-4c6b-9674-0a66934051adn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to spyderlib+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/spyderlib/e5ca0351-dc7d-69d1-67a1-3a16aa466845%40gmail.com.