Methods
getConnectionCommand(connectionFile, jupyterConsoleopt, callbackopt)
Returns the command to connect to the kernel defined in the connection file.
E.g.
jupyter console --existing connectionFile
.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
connectionFile |
string | The path to the connection file of the kernel to connect to. | ||
jupyterConsole |
string |
<optional> |
console | The jupyter console to start (e.g. console or qtconsole). |
callback |
Callback |
<optional> |
Calls back any errors and the connection command (err, command). |
getDefaultTerminal() → {string}
Returns the default terminal for your operation system:
macOS: Terminal.app
Windows: cmd
Linux: Checks for the existance of gnome-terminal, konsole, xfce4-terminal, lxterminal or xterm.
macOS: Terminal.app
Windows: cmd
Linux: Checks for the existance of gnome-terminal, konsole, xfce4-terminal, lxterminal or xterm.
Returns:
terminal
- Type
- string
launchJupyter(connectionFile, cwdopt, jupyterConsoleopt, terminalopt, callbackopt)
Launches a jupyter or ipython console and connects to the kernel defined in
the connection file. It starts the console by execution
jupyter jupyterConsole --existing connectionFile
.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
connectionFile |
string | The path to the connection file of the kernel to connect to. | ||
cwd |
string |
<optional> |
The current working directory where the terminal will be launched. | |
jupyterConsole |
string |
<optional> |
console | The jupyter console to start (eg qtconsole). |
terminal |
string |
<optional> |
getDefaultTerminal() | The terminal to launch. This will depend on your operating system. |
callback |
Callback |
<optional> |
Calls back errors. |
launchTerminal(commandopt, cwdopt, terminalopt, callbackopt)
Launches a Terminal at the given directory and executes a command.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
command |
string |
<optional> |
The command to execute in the terminal. | |
cwd |
string |
<optional> |
The current working directory where the terminal will be launched. | |
terminal |
string |
<optional> |
getDefaultTerminal() | The terminal to launch. This will depend on your operating system. |
callback |
Callback |
<optional> |
Calls back errors. |