Skip to content
Advertisement

Tag: printing

Using cat command in Python for printing

In the Linux kernel, I can send a file to the printer using the following command From what I understand, this redirects the contents in file.txt into the printing location. I tried using the following command I thought this command would achieve the same thing, but it gave me a “Permission Denied” error. In the command line, I would run

In python, why use logging instead of print?

For simple debugging in a complex project is there a reason to use the python logger instead of print? What about other use-cases? Is there an accepted best use-case for each (especially when you’re only looking for stdout)? I’ve always heard that this is a “best practice” but I haven’t been able to figure out why. Answer The logging package

Advertisement