[scribus] Interface issues and frame script
Gregory Pittman
gpittman at iglou.com
Sat Nov 10 16:38:33 UTC 2018
On 11/10/18 11:18 AM, Gregory Pittman wrote:
> On 11/10/18 10:25 AM, Colin Madwolf wrote:
>
>>
>> Well too some fiddling, Text edit saved the file as .py.rtf and it failed (even after changing the name and extension) I then looked at it in another editor and there was a load of characters like “/ etc in place of the spaces. So I opened the .py file and copied teh code again and pasted it in and voila it worked.
>>
> You should always pay attention to what your editor is doing -- apparently it wasn't a plain text editor. .rtf is not a plain text format.
>
>> Though I have to say it still needs some work - as when you run it again it forgets the path of the files on my computer
>
> This is a "feature" of Scribus. Happens to me too. The only solution I know is to hard-code a directory into the search. Even setting paths in Preferences doesn't help.
>
It was a bit trickier than I thought. There doesn't seem to be anything you can put in the fileDialog() command that helps this.
This does work:
Change
import scribus
to
import scribus, os
Before the line
scribus.setRedraw(False)
put
os.chdir('/home/gregp/Pictures') # edit this to your desired directory
I suppose you could run an extra fileDialog() command before os.chdir() to select a directory, but I don't see this saves anything over having find the directory with the fileDialog that's already there.
Greg
More information about the scribus
mailing list