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)viasubprocessand CUPS will handle the document conversion as best as possible, but Windows is trickier.