% pipx run --inspect script.py
>>>
% pipx run --inspect --no-cache script.py
>>>
Describe the solution you'd like
I will send pull request.
Describe alternatives you've considered
I read the source code(1) and tried to set the environment variable PYTHONINSPECT as a workaround.
https://docs.python.org/3/using/cmdline.html#envvar-PYTHONINSPECT
It often works fine, but when pipx creates a virtual environment(2), it causes for pipx for hanging.
Thank you very much for your awesome work.
pipx
is a great tool for me to run python scripts with inline script metadata (PEP 723).How would this feature be useful?
I'd like to inspect interactively after
pipx run script.py
likepython -i
. https://docs.python.org/3/using/cmdline.html#cmdoption-iDescribe the solution you'd like
I will send pull request.
Describe alternatives you've considered
I read the source code(1) and tried to set the environment variable
PYTHONINSPECT
as a workaround. https://docs.python.org/3/using/cmdline.html#envvar-PYTHONINSPECT It often works fine, but when pipx creates a virtual environment(2), it causes for pipx for hanging.(1): https://github.com/pypa/pipx/blob/1.6.0/src/pipx/util.py#L377-L390 (2): https://github.com/pypa/pipx/blob/1.6.0/src/pipx/venv.py#L163-L167
(FYI) References I wrote my blog (Sorry, these are Japanese)