The question may seem obvious, however, I didn't find the answer. I'm just trying to send an html local page (not the source) from Python to the printer.
The code:
NomFichier = 'test.html'
Fichier = open(NomFichier,'w')
Fichier.write(doc.getvalue())
time.sleep(1)
printer = os.popen('lpr','w')
printer.write(Fichier)
printer.close()
Fichier.close()
The error message I get:
TypeError: expected a character buffer object lpr : No file in the printer request.
Any idea what am I doing wrong? Thanks