Re: A new Scripter API documentation

ale rimoldi <[email protected]>
Newsgroups gmane.comp.graphics.scribus
Message-ID <[email protected]>
hi josé antonio

thanks for your comments!

> # Line 8:
> # To avoid error:
> # Traceback (most recent call last):
> #   File "<console>", line 1, in <module>
> # PermissionError: [Errno 13] Permission denied: 'api.txt'
> -- sys.stdout = open("api.txt", "w")
> ++ sys.stdout = open("./api.txt", "w")

both probably do not work correctly, depending on how scribus is
started.

it was a leftover (probably the last one) from the script i've used as a
starting point.

i've fixed it to always write to the same directory where the
script is (in a file called `output.txt`).
it should always be writable.

i've also commented it out, so that, by default, the output goes to the
terminal, not to the file.

> 
> # Line 32
> -- print('Constants')
> ++ print('<h2>Constants')
> # Lines 36-37; 44-45
> --    print(command[0])
> --    print(command[1] + ': ' + command[2])
> ++    print('<Command>' + command[0])
> ++    print('<Syntax>' + command[1] + ': ' + command[2])
> # Line 40
> -- print('Functions')
> ++ print('<h2>Functions')
> 
> Create Scribus paragraph styles "<Command>", "<Syntax>" and "<h2>".
> Import as text filtering to apply the paragraphs styles and erase the
> marks.

those are lines are from the "old" script that has been used as an
inspiration.

the script i'm using for the ouput is:

https://github.com/aoloe/scribus-script-repository/tree/master/export-scripter-api

there should be no active print() in there anymore.

ciao
a.l.e

___
Scribus Mailing List: [email protected]
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.