[scribus-dev] 1.5.6svn and Python3
Gregory Pittman
gpittman at iglou.com
Sat Nov 2 13:09:03 UTC 2019
On 11/2/19 5:41 AM, ale rimoldi wrote:
> hi greg
>
> for you information:
>
> exceptions are for errors at runtime.
>
> using print without parenthesis is a syntax error, so the error happens
> while python analyses the code to see what it has to do and does not
> even start running the code.
>
> you can see the difference by running this two scripts outside of
> scribus:
>
> this will fail without printing anything
>
>
> ```
> print("abc")
> print "abc"
> ```
>
> and this will first print "abc" and then fail:
>
> ```
> print("abc")
> import scribus
> ```
>
> you can also see that by putting an "print 'abc'" or a "import scribus"
> inside of an if.
> the first will always trigger an error, the second one only if python
> sees that the if condition is true.
>
> some of this is typical for python, some is valid for (almost) every
> programming language...
I'm having a hard time understanding what you're saying. In the instances I noted, most were in if clauses testing for scribus import, and even though I was running the the script in Scribus, the script failed with a traceback message.
Greg
More information about the scribus-dev
mailing list