Scribus Forums

Scribus => Scripts and Plugins => Topic started by: loudo on March 19, 2024, 03:34:19 PM

Title: Import scribus module for python script in vs code
Post by: loudo on March 19, 2024, 03:34:19 PM
Hello everyone,

here's my problem: I'm making a calendar design with Scribus (version 1.6.1) by putting empty text fields that just have a property name. For example, an empty text field with the property name "year".
I'm writing a python code to modify these text fields. It will automatically fill these fields with the right dates for each day, depending on the year.
My configuration: I'm using a macOS M1 laptop, the text editor 'Visual Studio Code and I have a virtual environment and python 3.11.

How do I import the Scribus module? I can't install it.   At the moment, I'm getting an error: ModuleNotFoundError: No module named 'scribus'.

Thanks for your help.

See you soon,
Loudo

Title: Re: Import scribus module for python script in vs code
Post by: a.l.e on March 19, 2024, 05:29:05 PM
you cannot run python script outside of scribus.

for a start, please use "Script > Execute Script" in the scribus menus...
Title: Re: Import scribus module for python script in vs code
Post by: loudo on March 20, 2024, 10:51:46 PM
Ok thanks for that clarification. I understand better