I have a Python 3 script that is going to be doing some regex substitution on some Rich Text Files (rtf
) and I would like to be able to print out a whole directory's files on Windows, Linux, and Mac.
Is there a way to print to the OS's default printer so that it works in all platforms?
There is no cross-platform way. On Linux and OS X you can invoke lpr(1)
via subprocess
and CUPS will handle the document conversion as best as possible, but Windows is trickier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With