Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support showing source when it's a multiline string passed to python -c #210

Open
cool-RR opened this issue Dec 20, 2020 · 2 comments

Comments

@cool-RR
Copy link
Owner

cool-RR commented Dec 20, 2020

No description provided.

@alexmojaki
Copy link
Collaborator

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?

@cool-RR
Copy link
Owner Author

cool-RR commented May 9, 2021

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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants