[Scribus] Yet ANOTHER scripting bug

Chris Bergstresser chris
Mon Dec 3 05:48:36 CET 2007


On Dec 2, 2007 6:45 PM, Craig Ringer <craig at postnewspapers.com.au> wrote:
> I'm getting really frustrated by people who have problems not mentioning
> their Scribus version :-P

   Sorry.  The Scribus version is 1.3.3.9 and I'm running on Windows
XP.  I was under the impression 1.3.3.9 was the latest "public"
version; although the Wiki proudly announces the 1.3.4 version as the
latest on the front page, and I do understand that the development
team is currently running 1.3.5.  Since the file formats are
incompatible I'm very interested in upgrading as soon as possible, but
with the scripting support I need I'm holding off until it's
considered somewhat stable.

> 1.3.3.x should generally be OK.

   Someone verified the problem earlier -- apparently the code where
you select a range of characters and set the style on it simply fails
under a large number of conditions.  I've no idea what "traceback" is
or how I would enable it; for me it just fails silently.  I've
rewritten the code so instead of selecting text I simply insert empty
strings at the beginning of the paragraph (thus positioning the cursor
there) and call setStyle(...), this (somewhat unintuitively) sets the
style for the entire paragraph.

    I've further discovered the problem where the length of a string
in Python (as reported with the len() function) is different from the
length as reported by Scribus.  It's apparently to do with
incompatible encodings between Python and Scribus; I still can't quite
get my head around that.

-- Chris



More information about the scribus mailing list