How can I run shell (terminal) in Google Colab?
问题 I know that I can call !ls to issue ls command to shell. But I want features like history or tab-completion. Is it possible to do so in Google Colab? 回答1: You can use jQuery Terminal Emulator backed with google.colab.kernel.invokeFunction Here's an example notebook. The key part is here, where you back it with shell function. def shell(command): return JSON([getoutput(command)]) output.register_callback('shell', shell) And here's how you use invokeFunction : try { let res = await google.colab