May-12-2020, 07:58 PM
How can I print a variable to the local printer?
Problem with the printer function
|
May-12-2020, 07:58 PM
How can I print a variable to the local printer?
May-12-2020, 09:26 PM
I'm trying to print data to the printer but get an error code: TypeError: to_printer() missing 1 required positional argument: 'text'
The code is below: from tkinter import * import tkinter as tk root = Tk() root.state('zoomed') root.title('Hotel King Ver 1.8') def to_printer(text): import subprocess lpr = subprocess.Popen("/usr/bin/lpr", stdin=subprocess.PIPE) lpr.stdin.write(text) print_button = tk.Button(root, text="print", command=to_printer) print_button.pack() root.mainloop()
May-13-2020, 01:18 AM
google 'python printer dialog'
May-13-2020, 01:23 AM
Merged with previous thread on same subject.
Please don't double post
Hello:) Have you solved this problem? I too have a problem with printer... I have no idea what to do, last month I wanted to buy for my family a quality home printer . I needed it for work, and the children needed it for school. I wanted to invest my money in a quality machine from a reliable brand. My boss suggested that I place an order on this service where quality office products are offered at a good price. These guys provide a wide selection of printers and cartridges. So I ordered one from , and now my family uses it every day! If you are still looking for a good printer, try checking out this website for more information!
Larz60+ write Dec-24-2021, 04:28 PM:
Link removed .. spam .. |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
[Tkinter] How to print data to the printer | scratchmyhead | 11 | 10,548 |
Aug-20-2020, 08:12 PM Last Post: StevenLee |
|
setup epson lq350 dot matrix printer by python-printer-escpos | gray | 10 | 10,846 |
Jun-05-2017, 01:20 PM Last Post: sparkz_alot |
|
the rs232 printer is not working | gray | 10 | 10,589 |
May-17-2017, 09:21 AM Last Post: gray |