cups.Connection.printFile

Antoon Pardon apardon at forel.vub.ac.be
Fri Sep 19 10:01:06 EDT 2008


On 2008-09-16, Graham Jenkins <graham at vpac.org> wrote:
>
> I'm trying to print a file from within a Python program. 
>
> The quick-and-dirty solution is to use something like: 
>
> fd = os.popen("lp -d MyPrinter", "wb") 
> fd.write(MyFileContents) 
>
> But it seems to me that there should be a clean solution like: 
>
> import cups 
> stat =
> cups.Connection.printFile("MyFile","MyPrinter","MyTitle","MyOptions") 

What about systems that don't use cups for printing?

-- 
Antoon Pardon



More information about the Python-list mailing list