-
Notifications
You must be signed in to change notification settings - Fork 956
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: Implement tool to explore long PySnooper outputs #176
Comments
Anyone who wants to implement this, we'll need to do a lot of work on defining the design and use cases before starting to implement. |
Until something is designed and implemented, I've written a small utility to convert pysnooper logs to html pages, with folds based on the indentation. It's clearly not perfect as there is no syntaxic coloration, nor a way to search for a specific term in the page, but it's better than looking at all the logs manually. https://gist.github.com/cxs-kge/689597fd216b0a64b5bf0c35354cd0b4 |
Cool, thank you. |
I've been using this little script to strip and diff two pysnooper's outputs
Put it in a file like strip_snoop.sh and use with path to file I've put it into a gist if that helps and for updates Btw. coloring has been added to output, but i wasn't able to disable it. I am investigating what's wrong with my setup, but I have at least few tips related to exploring outputs. I think diff is the tool to be used, if the output is stripped off undiffable data. |
Sorry for spamming this thread, but I should mention I found the problem. I assumed the output file is always overwritten with new content, but it is appended by default. There doesn't seem to be a switch to change this behavior, so I am using |
Thanks Martin. Right now I don't have this need, but next time I'll have it I'll look into your scripts. |
It happened that I was using PySnooper with
depth=10000
to explore a piece of running code. Of course, the output was huge with many levels of indentations. I wanted to explore it, but it was difficult to track the execution of a single function.It would be cool if there was a tool that accepted PySnooper outputs and allow some useful use cases of exploring them to find what you want.
The text was updated successfully, but these errors were encountered: