Q(): Powerful debug printing in Python
github.com
github.com
The README says everything. Write `import q; q(foo)` in your program, and foo will be printed to /tmp/q. No messing around with settings, no figuring out your complex environment's logging settings, where stdout/stderr end up, etc.
It doesn't just get printed there, either. It has very powerful, syntax-highlighted representation of the data. If you do q(a, b, c), it will print the variables to the shell.
For example, q(target, amount) in the hit() function of my Hearthstone simulator prints the following: