/usr/share/scribus/samples/Sample1.py is in scribus-data 1.4.6+dfsg-4build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" A sample script """
import sys
try:
from scribus import *
except ImportError:
print "This script only runs from within Scribus."
sys.exit(1)
margins = (10, 10, 10, 30)
def main():
if newDocument(PAPER_A4, margins, PORTRAIT, 1, UNIT_POINTS, NOFACINGPAGES, FIRSTPAGERIGHT, 1):
a = createText(50, 50, 200, 80)
setText("A Test for Scribus", a)
setFontSize(20, a)
b = createEllipse(267, 391, 60, 60)
setFillColor("Red", b)
saveDocAs("Sample1.sla")
if __name__ == '__main__':
main()
|