Run a Python script and format the exception traceback as Vim quickfix.
-
Free software: MIT license
-
Documentation: https://quickfix-py.readthedocs.io.
pip install --user quickfix-py
or using pipx
pipx install --spec git+https://github.com/tonyxty/quickfix.py quickfix-py
quickfix.py foobar.py foo bar
runs foobar.py
with command line arguments foo bar
under
supervision. Once an exception is raised, quickfix.py prints the stack
traceback in Vim quickfix format, one frame per line.
docs/vimrc_example
provides an example vimrc
configuration.
Currently only works for Python 3.x.
- By default, only those frames that are in "user" scripts are
printed, standard library calls are skipped.
--all
enables printing all frames. - By default, quickfix.py catches
Exception
s, but notKeyboardInterrupt
.--interrupt
enables catching ^C, thereby allowing conveniently locating an infinite loop.
quickfix.py also supports "thefuck" mode, inspired by
nvbn/thefuck. When --fuck
option is
given or the script is run as "thefuck.py", it outputs a line of command
that opens sensible-editor
at the location of exception. See
docs/bashrc_example
for idiomatic usages.
Authored by Tony Beta Lambda. This package was created with Cookiecutter and the ashwinvis/cookiecutter-pypackage project template.