Re: python script result

JLuc <[email protected]>
Newsgroups gmane.comp.graphics.scribus
Message-ID <[email protected]>
Le 21/04/2021 à 15:22, Gregory Pittman a écrit :

 > When I run ExtractText.py with a messageBox() to show the file saved to it shows me './pagecount.txt' to perhaps you 
should add that ./ at the beginning...

OK a rights access issue. I could fix it not with ./ but with the absolute path /DATA/etc/test/pagecount.txt
I guess the script's current directory is not the document's folder.

So the correct test scripts reads :
>>> #!/usr/bin/env python >>> # -*- coding: utf-8 -*->>> import scribus>>> pagenum = scribus.pageCount()>>> T=[]>>> T.append('pagecount=' + 
str(pagenum) + '\n\n')>>> output_file = open('/DATA/etc/test/pagecount.txt', 'w')>>> output_file.writelines(T)>>> 
output_file.close()
JLuc



___
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.