How does one open an interactive Python console/shell/prompt within Google Colab? Is it possible? An iPython prompt would be ideal but a regular prompt would suffice.
Also, it would be significantly more useful if the console's interpreter shared access to the variables/state with the Colab notebook's kernel.
!jupyter console --existing appears to hang with no output because it is waiting to acquire the GIL in the same process as the notebook's runtime that is executing the ! magic, which isn't going to give it up until the ! is done. For the same reason I don't think it's going to be easy to get a subprocess invocation to share state with the notebook's runtime.
Obvs. you could program your own input() + eval() in a loop to simulate a py prompt that shared the env with your notebook.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With