Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send print job to printer in python

I used Tkinter to draw some lines in python and I would like to print that picture to usb connected and/or network printer in Windows. How should I do that?

like image 825
BK C. Avatar asked Apr 14 '16 15:04

BK C.


1 Answers

try this! It uses os module to start the file in the default printer!

import os

os.startfile("YourDocument", "print")
like image 143
TheLazyScripter Avatar answered Sep 20 '22 23:09

TheLazyScripter