Predefined Constants
There are some Constants defined to help using the Commands: 
Scribus Version:
	The script interface provides two variables containing the current Scribus version in the scribus module. Scripts can use these variables to check that they're running under the version of Scribus they expect, and to report information about incompatibilities to the user. These two variables, scribus_version and scribus_version_info, were added in 1.2.1 and 1.3.0svn and will not be present in earlier versions. If you need to, you can check for their presence with hasattr(scribus, 'scribus_version').
	scribus_version contains the current Scribus version as a string. It will usually look like '1.2.1svn' or '1.3.0', for example, but is not guaranteed to always follow that format. This variable is useful when you need to display the version to the user, for example when reporting an incompatibility. Do not parse or compare this variable, that is what scribus_version_info is for.
	scribus_version_info is a tuple similar to the sys.version_info tuple provided by Python. It is a tuple of the form (majorversion, minorversion, patchlevel, extraversion, build) for example, 1.2.1svn will have (1,2,1,'svn',0) and 1.3.2 will have (1,3,2,'',0) . These tuples are ideal for checking for minimum versions, etc, because Python compares tuples element-by-element, left-to-right. For example:
if scribus.scribus_version_info[:3] < (1,2,2):
    messageBox("Scribus - Python script",
        "This script requires Scribus 1.2.2 or newer. "+"You're running %s." % scribus.scribus_version, scribus.ICON_CRITICAL)
    sys.exit()
Note that if you are using this style of import statement:
import scribus
you will need to add a prefix to these predefined constants, for example, scribus.ICON_CRITICAL.
Unit Enumeration Constants: 
| 
	UNIT_POINTSMeasurement Unit Point = 0UNIT_MILLIMETERSMeasurement Unit Millimeter = 1UNIT_INCHESMeasurement Unit Inch = 2UNIT_PICASMeasurement Unit Pica = 3 | 
Unit Conversion Constants
These conversion factors can be used to convert units to and from points.
Thus, to convert inches to points, you can simply write 'value/inch', to
convert points to inches you write 'value*inch', and to convert inches to mm
you write 'value*mm/inch' .
| 
	ptpoints in 1 ptinchinches in 1 pt
	ppica in 1 ptcm
	centimetres in 1 ptmmmillimetres in 1 pt...Other constants will be provided if the Scribus core knows about them. | 
Page Orientation Definitions: 
| 
	PORTRAITPage orientation Portrait = 0LANDSCAPEPage orientation Landscape = 1 | 
Definitions for Page Formats: 
If you are using these, it's important to understand that these constants are simply tuples of these specific numbers. There are now two sets of these constants for A and B series of paper formats.
The original set, such as PAPER_A4, is used when a document is created with points units. Now you can also use the similarly named PAPER_A4_MM when you are using millimeters as the page units. As before, they must be used with the appropriate constant, either UNIT_POINTS or UNIT_MILLIMETERS. What you can then do, for example, is use them to create a document in points, then switch the units of the document with the setUnit() command.
| 
	PAPER_A0Paper format A0 = 2380 x 3368 PointsPAPER_A1Paper format A1 = 1684 x 2380 PointsPAPER_A2Paper format A2 = 1190 x 1684 PointsPAPER_A3Paper format A3 = 842 x 1190 PointsPAPER_A4Paper format A4 = 595 x 842 PointsPAPER_A5Paper format A5 = 421 x 595 PointsPAPER_A6Paper format A6 = 297 x 421 PointsPAPER_A7Paper format A7 = 210 x 297 PointsPAPER_A8Paper format A8 = 148 x 210 PointsPAPER_A9Paper format A9 = 105 x 148 Points | 
	PAPER_A0_MMPaper format A0 = 841 x 1189 MillimetersPAPER_A1_MMPaper format A1 = 594 x 841 MillimetersPAPER_A2_MMPaper format A2 = 420 x 594 MillimetersPAPER_A3_MMPaper format A3 = 297 x 420 MillimetersPAPER_A4_MMPaper format A4 = 210 x 297 MillimetersPAPER_A5_MMPaper format A5 = 148 x 210 MillimetersPAPER_A6_MMPaper format A6 = 105 x 148 MillimetersPAPER_A7_MMPaper format A7 = 74 x 105 MillimetersPAPER_A8_MMPaper format A8 = 52 x 74 MillimetersPAPER_A9_MMPaper format A9 = 37 x 52 Millimeters | 
| 
	PAPER_B0Paper format B0 = 2836 x 4008 PointsPAPER_B1Paper format B1 = 2004 x 2836 PointsPAPER_B2Paper format B2 = 1418 x 2004 PointsPAPER_B3Paper format B3 = 1002 x 1418 PointsPAPER_B4Paper format B4 = 709 x 1002 PointsPAPER_B5Paper format B5 = 501 x 709 PointsPAPER_B6Paper format B6 = 355 x 501 PointsPAPER_B7Paper format B7 = 250 x 355 PointsPAPER_B8Paper format B8 = 178 x 250 PointsPAPER_B9Paper format B9 = 125 x 178 PointsPAPER_B10Paper format B10 = 89 x 125 Points | 
	PAPER_B0_MMPaper format B0 = 1000 x 1414 MillimetersPAPER_B1_MMPaper format B1 = 707 x 1000 MillimetersPAPER_B2_MMPaper format B2 = 500 x 707 MillimetersPAPER_B3_MMPaper format B3 = 353 x 500 MillimetersPAPER_B4_MMPaper format B4 = 250 x 353 MillimetersPAPER_B5_MMPaper format B5 = 176 x 250 MillimetersPAPER_B6_MMPaper format B6 = 125 x 176 MillimetersPAPER_B7_MMPaper format B7 = 88 x 125 MillimetersPAPER_B8_MMPaper format B8 = 62 x 88 MillimetersPAPER_B9_MMPaper format B9 = 44 x 62 MillimetersPAPER_B10_MMPaper format B10 = 31 x 44 Millimeters | 
| 
	PAPER_C5EPaper format C5E = 462 x 649 PointsPAPER_COMM10EPaper format Comm10E = 298 x 683 PointsPAPER_DLEPaper format DLE = 312 x 624 PointsPAPER_EXECUTIVEPaper format Executive = 542 x 720 PointsPAPER_FOLIOPaper format Folio = 595 x 935 PointsPAPER_LEDGERPaper format Ledger = 1224 x 792 PointsPAPER_LEGALPaper format Legal = 612 x 1008 PointsPAPER_LETTERPaper format Letter = 612 x 792 PointsPAPER_TABLOIDPaper format Tabloid = 792 x 1224 Points | 
Definitions for Document Layout:
| 
	FACINGPAGESLayout with facing Pages.NOFACINGPAGESNormal Layout of the Document.FIRSTPAGELEFTThe first Page of the Document is a left Page.FIRSTPAGERIGHTThe first Page of the Document is a right Page. | 
Definitions for page item types:
| 
	ITEM_ITEMTYPE1Legacy type, do not use, just here for completeness.ITEM_IMAGEFRAMEITEM_ITEMTYPE3Legacy type, do not use, just here for completeness.ITEM_TEXTFRAMEITEM_LINEITEM_POLYGONITEM_POLYLINEITEM_PATHTEXTITEM_LATEXFRAMEITEM_OSGFRAMEITEM_SYMBOLITEM_GROUPITEM_REGULARPOLYGONITEM_ARCITEM_SPIRALITEM_TABLEITEM_NOTEFRAMEITEM_MULTIPLE | 
Alignment Definitions: 
| 
	ALIGN_LEFTText is aligned to the Left.ALIGN_CENTEREDThe Text is centered in the Textframe.ALIGN_RIGHTThe Text is aligned to the Right Side of the TextframeALIGN_FORCEDThe Text has forced AlignmentALIGN_BLOCKThe Text has block Alignment | 
Vertical alignment Definitions: 
| 
	ALIGNV_TOPText is aligned vertically to the top.ALIGNV_CENTEREDText is aligned vertically to the center.ALIGNV_BOTTOMText is aligned vertically to the bottom. | 
First line offset Definitions: 
| 
	FLOP_REALGLYPHHEIGHTFirst line offset is determined according to the maximum height of glyphs in the line.FLOP_FONTASCENTFirst line offset is determined according to font ascent.FLOP_LINESPACINGFirst line offset is determined according to current linespacing.FLOP_BASELINEGRIDFirst line offset is determined according to the baseline grid. | 
Line related Definitions: 
| 
    LINE_DASHLINE_DASHDOTLINE_DASHDOTDOTLINE_DOTLINE_SOLIDJOIN_BEVELJOIN_MITTERJOIN_ROUNDCAP_FLATCAP_ROUNDCAP_SQUARE | 
Colorspace Definitions: 
| 
	CSPACE_UNDEFINEDCSPACE_RGBCSPACE_CMYKCSPACE_GRAYCSPACE_DUOTONECSPACE_MONOCHROME | 
Fill related Definitions: 
| 
	FILL_NOGNo gradient, plain colorFILL_HORIZONTALGFILL_VERTICALGFILL_DIAGONALGFILL_CROSSDIAGONALGFILL_RADIALG | 
Dialog Buttons
| Button Type | Return Value | 
    | BUTTON_ABORT | 262144 | 
    | BUTTON_CANCEL | 4194304 | 
    | BUTTON_IGNORE | 1048576 | 
    | BUTTON_NO | 65536 | 
    | BUTTON_NONE | N/A | 
    | BUTTON_OK | 1024 | 
    | BUTTON_RETRY | 524288 | 
    | BUTTON_YES | 16384 | 
There is also a hierarchy of buttons in terms of how they appear in the dialogs, with this ordering, left to right:
BUTTON_YES, BUTTON_NO, BUTTON_OK, BUTTON_RETRY, BUTTON_IGNORE, BUTTON_ABORT, BUTTON_CANCEL
For example, even if you assign CANCEL to button1, RETRY to button2, and YES to button3, they will appear YES, RETRY, and CANCEL left to right in the dialog.
Dialog Icons
| 
    ICON_CRITICALICON_INFORMATIONICON_NONEICON_WARNING | 
Tab alignment
| 
	TAB_LEFTTAB_RIGHTTAB_PERIODTAB_COMMATAB_CENTER | 
Print languages
| 
	PRNLANG_POSTSCRIPT1Postscript Level 1 (requires Ghostscript)PRNLANG_POSTSCRIPT2Postscript Level 2 (requires Ghostscript)PRNLANG_POSTSCRIPT3Postscript Level 3PRNLANG_WINDOWSGDIWindows GDI (available on Microsoft Windows only)PRNLANG_PDFAdobe PDF (available only on MacOS and *nix systems) |