irty 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",&quo
hon 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:
>
:
>
> > 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&quo
ents)
>
> 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
--
http://mail.python.org/mailman/listinfo/python-list