https://github.com/adamj9431/notebook_xterm
A terminal emulator embedded in a IPython/Jupyter notebook.
https://github.com/adamj9431/notebook_xterm
ipython-magic jupyter-extension jupyter-notebook terminal-emulators
Last synced: 8 months ago
JSON representation
A terminal emulator embedded in a IPython/Jupyter notebook.
- Host: GitHub
- URL: https://github.com/adamj9431/notebook_xterm
- Owner: adamj9431
- License: mit
- Created: 2017-11-19T19:52:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-03T22:43:35.000Z (about 4 years ago)
- Last Synced: 2025-05-31T08:06:20.316Z (9 months ago)
- Topics: ipython-magic, jupyter-extension, jupyter-notebook, terminal-emulators
- Language: Jupyter Notebook
- Size: 24.4 KB
- Stars: 27
- Watchers: 3
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# notebook_xterm
[](https://badge.fury.io/py/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](https://xtermjs.org) 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](example.ipynb).
Check out [IBM Data Science Experience](https://datascience.ibm.com/) 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](http://ipython.readthedocs.io/en/stable/config/extensions/index.html#using-extensions) to load it automatically.
```
%load_ext notebook_xterm
```
To display a terminal, type the [magic function](http://ipython.readthedocs.io/en/stable/interactive/magics.html) `%xterm` in a blank cell:
```
%xterm
```
## Tested Environments
+ [IBM Data Science Experience](https://datascience.ibm.com/)
+ Jupyter 4.3.0
+ Python 2 and 3
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
## Contributing
Pull requests welcome!