/usr/share/scribus/samples/3columnUSLTR.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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Creates 3 column layout on US Letter paper and save it under 3columnUSLTR.sla filename. This is a simple way to demonstrate creating a doc on the fly. """
try:
# Please do not use 'from scribus import *' . If you must use a 'from import',
# Do so _after_ the 'import scribus' and only import the names you need, such
# as commonly used constants.
import scribus
except ImportError,err:
print "This Python script is written for the Scribus scripting interface."
print "It can only be run from within Scribus."
sys.exit(1)
def main(argv):
"""This is a simple way to demonstrate creating a doc on the fly. """
pass # <--- Delete this line
import sys
try:
from scribus import *
except ImportError:
print "This script only runs from within Scribus."
sys.exit(1)
margins = (50, 50, 50, 50)
size = (612, 792)
def main():
if newDocument(PAPER_LETTER, margins, LANDSCAPE, 1, UNIT_POINTS, NOFACINGPAGES, FIRSTPAGELEFT, 1):
a = createText(50, 50, 230, 512)
setTextAlignment(1,a)
setText("Column A", a)
setFontSize(12, a)
b = createText(280, 50, 230, 512)
setTextAlignment(1,b)
setText("Column B", b)
setFontSize(12, b)
c = createText(510, 50, 230, 512)
setTextAlignment(1,b)
setText("Column C", c)
setFontSize(12, c)
#saveDocAs("3columnUS.sla")
if __name__ == '__main__':
main()
|