-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
I am using the IPython notebook as a teaching tool (as do many others I imagine), and as part of this, students have to write simple programs using loops. Of course, as would be expected, students end up writing infinite loops, which if they contain a print statement will basically crash the web browser, and it's hard to explain to them how to kill the browser process, restart it, etc.
Would it be possible to have an option (or even have it by default) for the notebook that a single cell cannot print out more than a given number of lines or characters, to ensure that the notebook is more fool-proof against infinite loops? Of course, when not using print statements, students can simply interrupt the kernel, but if values are printed, then this can cause severe crashes.
I'd be fine with this being optional, and I could tell my students to enable it at the start of the course or notebook. Are there already ways to do this?