[Python-ideas] Have REPL print less by default

Oscar Benjamin oscar.j.benjamin at gmail.com
Thu Apr 21 04:44:53 EDT 2016

On 21 April 2016 at 02:03, Steven D'Aprano <steve at pearwood.info> wrote:
> On Wed, Apr 20, 2016 at 03:01:48PM -0400, Random832 wrote:
>> You know what would make complicated infinite recursion easier to debug?
>> The arguments.
> Check out the cgitb module, which installs an except hook which (among
> many other things) prints the arguments to the functions. Run this
> sample code:
> import cgitb
> cgitb.enable(format='text')

Oh that's nice. It would be good if you could use it with -m like pdb

    $ python -m cgitb myscript.py

rather than needing to insert it in the code.


More information about the Python-ideas mailing list