"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "scribus-1.3.3.12/scribus/plugins/scriptplugin/samples/3columnUSLTR.py" of archive scribus-1.3.3.12.tar.gz:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 """ 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. """
5
6 try:
7 # Please do not use 'from scribus import *' . If you must use a 'from import',
8 # Do so _after_ the 'import scribus' and only import the names you need, such
9 # as commonly used constants.
10 import scribus
11 except ImportError,err:
12 print "This Python script is written for the Scribus scripting interface."
13 print "It can only be run from within Scribus."
14 sys.exit(1)
15
16 def main(argv):
17 """This is a simple way to demonstrate creating a doc on the fly. """
18
19 pass # <--- Delete this line
20
21
22 import sys
23
24 try:
25 from scribus import *
26 except ImportError:
27 print "This script only runs from within Scribus."
28 sys.exit(1)
29
30 margins = (50, 50, 50, 50)
31 size = (612, 792)
32
33 def main():
34 if newDocument(PAPER_LETTER, margins, LANDSCAPE, 1, UNIT_POINTS, NOFACINGPAGES, FIRSTPAGELEFT, 1):
35 a = createText(50, 50, 230, 512)
36 setTextAlignment(1,a)
37 setText("Column A", a)
38 setFontSize(12, a)
39 b = createText(280, 50, 230, 512)
40 setTextAlignment(1,b)
41 setText("Column B", b)
42 setFontSize(12, b)
43 c = createText(510, 50, 230, 512)
44 setTextAlignment(1,b)
45 setText("Column C", c)
46 setFontSize(12, c)
47 #saveDocAs("3columnUS.sla")
48
49
50 if __name__ == '__main__':
51 main()