PySnooper
PySnooper copied to clipboard
Feature request: Support showing source when it's a multiline string passed to `python -c`
better-exceptions actually does this (with heavy caveats) by looking up its pid in the output of a ps command to get the full command: https://github.com/Qix-/better-exceptions/blob/4e150ba3428013e55c274b06829b0360704d6750/better_exceptions/formatter.py#L149
This baffles me. Why are you running complicated code in python -c?
better-exceptions actually does this (with heavy caveats) by looking up its pid in the output of a
pscommand to get the full command: https://github.com/Qix-/better-exceptions/blob/4e150ba3428013e55c274b06829b0360704d6750/better_exceptions/formatter.py#L149 Interesting, we might want to do the same.
This baffles me. Why are you running complicated code in
python -c?
For the same reason PySnooper exists in the first place instead of just using a debugger: Because people suck.