[Scribus] image frame script problem

Gregory Pittman gpittman
Tue Jul 4 16:39:19 CEST 2006


Dan Fink wrote:
> Please bear with me here--I'm new at both Scribus and Python!
>
> I'm trying to run the 'Add Blank Space Around Image Frame' script, and
> get this error:
>
> Traceback (most recent call last):
>   File "<string>", line 9, in ?
>   File "/home/danbob/book/fscript.py", line 5
>      try:
>      ^
>  SyntaxError: invalid syntax
>
> I enabled the Scripter, env and python are where they should be
> in /usr/bin.
>
> Any ideas? Am I missing something obvious?
> Thanks in advance!
>   
This is my script. It looks like there is an indentation problem in the 
Wiki. Python is very particular about indentations, since that is how it 
detects one block of commands from another.
The simplest thing, I think, would be to change
try:
import scribus
by deleting the "try:" and moving "import scribus" to the left margin. 
The "try:" is really just a trap to detect if you're trying to run the 
script outside of Scribus, and in this case is not accompanied by an 
"else:" so it would just generate a Python error anyway.

Sorry about that. I'll fix the Wiki page.

Greg



More information about the scribus mailing list