[scribus] a warning, serving as a bouncer...

a.l.e ale.comp_06 at xox.ch
Mon Aug 17 10:42:27 UTC 2015


hi martin

> When importing a svg file to the DTP programme "Scribus" it shows a
> warning message * (with just one OK-button), that has to be confirmed to
> go on. This stops my Python Script from working.
>

there have been a few patches to suppress such popups when running a 
script...

and this one would be welcome, too!

on top of it, you raise a good question about the best way to make the 
programmer or the user that a warning / error has been issued.

the easy way is to simply have a warning output in the terminal.
the "correct" way might be to introduce exceptions (you can look up for 
"python catch exceptions" on stack overflow :-)... but i'm no big fan of 
exceptions...

another way would to have a custom method "get_last_error()" that you 
can check after running a command that might raise an error.

all in all, most scripts run in a controlled environment and just 
ignoring the warnings is not the worst idea.
but maybe somebody wants to digg further in the issue an make a proposal 
for better handling those cases!


keep on enjoying your holidays!
a.l.e



More information about the scribus mailing list