Pyrinter is a free open source python package for easy way to use physical printers.
As for the moment the package only works on windows, but in the future we want to make it cross-platform
with pip:
pip install pyrinterthe following code is a hello world for printing text using the printer PDFCreator
(the printer name may be empty for default printer):
from pyrinter import Printer
from pyrinter import Document
doc = Document()
doc.add_text("Hello World")
printer = Printer("PDFCreator")
printer.print_doc(doc)