I want to use a shebang line in my scripts, e.g.
#! /usr/env/bin python
but when debugging I also want pdb/ipdb to be invoked automatically as in:
python -m ipdb myscript.py
Is there a way to combine these? In other words, is there a version of the shebang that will also automatically invoke pdb/ipdb upon a failure? Something like:
#! /usr/env/bin python -m ipdb