Is there in 2018 a python3 library that implements the Internet Printing Protocol? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Networking (https://python-forum.io/forum-12.html) +--- Thread: Is there in 2018 a python3 library that implements the Internet Printing Protocol? (/thread-14565.html) |
Is there in 2018 a python3 library that implements the Internet Printing Protocol? - AFoeee - Dec-06-2018 All python libraries that implement the Internet Printing Protocol (IPP) do not seem to work under python3. Here is what I've tried so far:
I use python 3.6.7 on linux. Thank you and best regards AFoeee RE: Is there in 2018 a python3 library that implements the Internet Printing Protocol? - heiner55 - Jun-07-2019 You could work with CUPS directly: https://pypi.org/project/pycups/ #!/usr/bin/python3 import time, pprint, cups conn = cups.Connection() printers = conn.getPrinters () pprint.pprint(printers) print() printer = conn.getDefault() print("Default1:", printer) if printer == None: printer = list(printers.keys())[0] print("Default2:", printer) myfile = "./test.txt" pid = conn.printFile(printer, myfile, "test", {}) while conn.getJobs().get(pid, None) is not None: time.sleep(1) #done |