[Scribus] Please help with 'simple' scripting task - print the current document

Craig Ringer craig
Fri Jun 22 23:14:49 CEST 2007

Bill Hudacek wrote:
> Whew!  That did it.  I'll escape, reputation intact (this time), thanks 
> to you all.
> Note that I have 1.2.4 and 1.3.3 and neither supported 'printNow'.  I 
> think that scripter Printing doc page is sorely in need of an update...

It used to just be print(), but that's a Python keyword and I think the
Python parser changed to be stricter about it.

If you need to support older versions too, use:

p = Printer()
doPrint = getattr(p, "printNow", None)
if doPrint is None:
    doPrint = getattr(p, "print")

A bit convoluted, unfortunately, but effective.

More information about the scribus mailing list