datatrail-jhu / python

A bonus course for DataTrail graduates who wish to learn python
https://datatrail-jhu.github.io/python/
Creative Commons Attribution 4.0 International
0 stars 2 forks source link

Include `xterm` for launching a terminal in the course. #5

Open tillahoffmann opened 9 months ago

tillahoffmann commented 9 months ago

Colab only offers a terminal in their paid Pro version. This article suggests an alternative terminal that's embedded in the notebook. In short, the following lines start one.

!pip install colab-xterm
%reload_ext colabxterm
%xterm

The first line installs the package, the second loads the extension which adds the %xterm magic command to the kernel, and the last starts the terminal. In general, it probably makes sense to execute the first two lines together to install requirements and the last where necessary to start a terminal.

cansavvy commented 9 months ago

Thanks for writing this down. Yes this is great.