Add an IPython mode to eval
Current working command schemes:
!eval -ipython!e -i
Support IPython mode for eval with code blocks as "cells". Matplotlib will use a custom backend for show() which writes a png file to the output folder for upload.
This will use the ipykernel backend with full support for ipython magic commands like %%time
We can also inject custom exec tasks, imports, or custom ipython macros and magic commands via the ipython api.
Most of the runtime wrapper can be sent from the bot side, we will just require snekbox to add the ipython package to deployment.
Depends on
- https://github.com/python-discord/snekbox/pull/159
- https://github.com/python-discord/bot/pull/2326
- Add
ipythonto our snekbox deployment venv
Proof of concept

- Since IPython errors are colored with ANSI codes, we can use an ansi codeblock to render them

I wonder if this needs to actually be a separate option. On the surface we could just replace the behavior of concatenating several blocks into this. Then again not everyone might find ipython intuitive without prior experience. We could make it default to a usual run if there's up to one codeblocks, and an ipython run otherwise. The error coloring is a very nice bonus.