[scribus] problems with the Scripter

wibr lists at wibr.de
Sat Jul 9 18:02:58 UTC 2011

Hi all,

while writing my first lines using the scripter API some things came up:

1. it would be nice if the version of python, which is used by the 
scripter, appears somewhere in the documentation

2. can I somehow use "print" in my scripts / see the output of that? It 
would be convenient for debugging, now I use messageBoxes, but a simple 
print would be better. I tried to use the integrated console, but it had 
some problems with my indentations. (worked fine without console, though)

3. I use importPage() for duplicating pages. However, it takes the 
filename as an argument, not a file object. So it reloads the file every 
time again, which is quite slow...it would be better if I could load the 
file once and then use it many times...

4. Now the problem why I got stuck:
At some point of my script I have something like this:
for oneItem in scribus.getPageItems():
     if oneItem[1] == 4: 	# 4 = Textfield
         test1=oneItem[0]+' '+str(pageCounter # it e.g. 'Text50 3'
         test2=scribus.getText(oneItem[0])# empty! but it's not!

So I don't know why the getText would return an empty string, since 
there is definitely some Text in this text field. (I checked manually 
after the script was done)

Any ideas on this?

Thank you!


More information about the scribus mailing list