How to send print job to printer in python

I used Tkinter to draw some lines in python, and I would like to print this image on a connected usb and / or network printer in Windows. How can I do it?

+7
python printers network-printers
source share
1 answer

try it! It uses the os module to run the file on the printer by default!

import os os.startfile("YourDocument", "print") 
+3
source share

All Articles