[Scribus] Bug in script with smart quote?

Chris Bergstresser chris
Fri Nov 30 22:15:48 CET 2007


Hi --

   Nobody bothered to reply to this message, and I'm still having the
same problem.  Does anyone have a working Python script for Scribus
that reads text from a file, replaces straight quotes with smart ones,
inserts the text into a text frame, then sets the style on it?  Or can
shed some insight on why the following doesn't work?
   This is with Scribus 1.3.3.9 on Windows XP.

-- Chris

On Nov 16, 2007 3:12 PM, Chris Bergstresser <chris at subtlety.com> wrote:
>    Can someone explain why this code snippet throws a "Selection Index
> Out of Bounds" with a curly quote in the "This doesn't work", but
> works with a straight quote (as in "This shouldn't work, but does")?
>
>         scribus.selectText(0, 0, selected_frame)
>         start_pos = len(scribus.getAllText(selected_frame))
>         scribus.insertText("This doesn't work", -1, selected_frame)
>         end_pos = len(scribus.getAllText(selected_frame))
>         scribus.selectText(start_pos, end_pos - start_pos, selected_frame)



More information about the scribus mailing list