Lich-Corals / linux-file-converter-addon

Convert between various image, audio and video formats.
GNU General Public License v3.0
15 stars 6 forks source link

redefine print for quitness #2

Closed derVedro closed 1 year ago

derVedro commented 1 year ago

for shure you can use print for debugging small things, but that little hack lets you quickly turn it on and off.

Lich-Corals commented 1 year ago

Thanks for the pull request!

I just added the code locally, but I don't understand what it does, or how I can use it. I would be happy about an explanation of what the code does and how it can help me.

derVedro commented 1 year ago

I assume you use print function for debug, just to see what part of the code was executing. I guess this information is not necessary needed all the time, so you can suppress the output just by that one line of code. It redefines the print function to an anonymous function that does nothing. So if you call print("some text") then there is no output. If you want to debug yet again the code, you can simply comment the line out.

Lich-Corals commented 1 year ago

Thanks, I will add this to the project.