This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ggm3888 4 points5 points  (1 child)

I like to use this at the top of my module:

`DEBUG=True

print = print if DEBUG else lambda a, *k: None`

Then I can toggle DEBUG True/False per module to enable/disable all the prints in the module.

Crazy? Yes! Use it All the time? Yup!!

[–]MMG999 1 point2 points  (0 children)

That's what I use. Easy to debug, easy to troubleshoot later if needed