[scribus] Print a page from script

Sentinel sentinel.ru at gmail.com
Mon Jun 8 08:48:37 CEST 2009


 It works, thank you! This is the code:

#!/usr/bin/env python
from scribus import *
import scribus

myprinter=scribus.Printer()
myprinter.pages=[2,1,3]
myprinter.printNow()


WBR, Eugene.

On Mon, Jun 8, 2009 at 11:18 AM, Benjamin Dumke
<scribus at benjamin-dumke.de>wrote:

> "print" is a reserved word in Python 2, which is why you get the syntax
> error. Here's how it seems to be supposed to work (I didn't try it, I
> just checked a few things the scribus python console):
>
> myprinter=scribus.Printer()
> myprinter.pages = [1,2,7]
> p.printNow()
>
> Hope that helps.
>
> Gretings
>
> Ben
>
>
> Sentinel schrieb:
> > Dear almighty All!
> >
> >  Can someone, please, help me with a simple task: to print a certain page
> > from script? It seems that i work out everything from a Scripter FAQ and
> > wiki, Scribus mailing list (some guy resolving this problem in 2007 - but
> > today those examples just didn't work), tried Scribus IRC-channel, tried
> > every syntax variants i can imagine, but still can't get this done.
> >  I'm using Scribus 1.3.5 svn and in most cases get the syntax error.
> > Something like this:
> >
> >      scribus.print(pages="1")
> >                  ^
> >  SyntaxError: invalid syntax
> >
> > So.. please, help me write a simple script for printing. And - if this is
> > possible - i will post it on wiki.
> >
> > WBR, Eugene.
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> http://lists.scribus.net/pipermail/scribus/attachments/20090608/b04a7fa4/attachment.htm
> >
> > _______________________________________________
> > scribus mailing list
> > scribus at lists.scribus.net
> > http://lists.scribus.net/mailman/listinfo/scribus
> >
>
>
> _______________________________________________
> scribus mailing list
> scribus at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20090608/4f1f813c/attachment.htm>



More information about the scribus mailing list