Hi!
I am writing a JupyterLab extension and currently have a command that runs a Python script.
I want to shutdown the new terminal session after running the command (presumably via session.shutdown
) but if I uncomment that line in the code below, the session terminates prior to the command running/completing.
How can I achieve my intended behavior? Any help is appreciated!
execute: () => {
TerminalSession.startNew()
.then(session => {
session.send({
type: "stdin",
content: ['python3 /test.py\n']
});
// session.shutdown();
});
}
Thanks in advance!