How do I print to the OS's default printer in Python 3 (cross platform)? How do I print to the OS's default printer in Python 3 (cross platform)? python python

How do I print to the OS's default printer in Python 3 (cross platform)?


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.


With the OS module you can print files in Windows or higher.