When developing a Python package, it\'s very convenient to use the -m option to run modules inside the package as scripts for quick testing. For example, for
-m
There are efforts underway to solve this in Python itself. Looks like with Python 3.7, you can do:
python -m pdb -m somepackage.somemodule
And I've provided a backport for older Python versions (2.7+):
pip install backports.pdb python -m backports.pdb -m somepackage.somemodule