notebook_xterm
notebook_xterm copied to clipboard
A terminal emulator embedded in a IPython/Jupyter notebook.
notebook_xterm
A fully-functional terminal emulator in an IPython/Jupyter notebook. This is useful for notebook environments that don't provide shell access. Uses xterm.js for a VT100-compliant Javascript terminal front-end component. Instead of an actual WebSocket, notebook_xterm uses the Javascript Jupyter cell execute function Jupyter.notebook.kernel.execute() as a channel to communicate between the Python runtime on the server (TerminalServer) and JavaScript runtime in the browser (TerminalClient).

Getting Started
Link to an Example notebook.
Check out IBM Data Science Experience for a free, managed data science platform that includes a Jupyter notebook server.
From within an IPython notebook, install the package using pip:
!pip install notebook_xterm
Load the IPython extension. You'll need to reload the extension each time the notebook kernel starts. Alternatively, you can add notebook_xterm to the configuration file to load it automatically.
%load_ext notebook_xterm
To display a terminal, type the magic function %xterm in a blank cell:
%xterm
Tested Environments
- IBM Data Science Experience
- Jupyter 4.3.0
- Python 2 and 3
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Contributing
Pull requests welcome!