## Scripting Scribus with Python

### Overview

This is the description how to use the scripting plug-in for Scribus. The Scripter allows you to use the powerful Python programming language as a scripting language in Scribus. This can help you to automate otherwise repetitive tasks or add new features.

Note that additions to the Scripter are being made frequently, which means that the available documentation may be incomplete.

### Using the Plug-in

Scribus is being shipped with some “hard-wired” scripts, which are available via Scripter > Scribus Scripts:

There are some simple example scripts in the subdirectory “samples.” Its location depends on the operating system you use, e.g. `/usr/local/share/scribus` or `/usr/share/scribus` on Linux. If you have created a script which you think could be useful for others, please feel free to add it to the Scribus Wiki or paste it into an email and send it to the Scribus mailing list.

To execute an external Python script, you have to use Script > Execute Script. Scribus will open a file dialog, which allows you to select a Python script (file extension: *.py). Script > Recent Scripts shows a list of recently executed scripts.

You can use many Python modules with this plug-in, the only exception being scripts that expect parameters from the command Line. These won’t work because the plug-in gives the Python interpreter an empty command line.

The menu entry Script > Show Console will launch an interactive Python console, where you can execute commands directly. There is no need to use “`from scribus import *`”, as this has already been done. You can use all the commands listed in the following pages of the Scripter API documentation directly without any prefix.