Changed things to use config.py for defaults
authorrgbecker
Wed, 07 Mar 2001 18:57:12 +0000
changeset 684 2a43c747527a
parent 683 fbd2b18742a5
child 685 582823622e2e
Changed things to use config.py for defaults
docs/tools/rltemplate.py
docs/userguide/ch2_graphics.py
docs/userguide/ch4_platypus_concepts.py
docs/userguide/examples.py
docs/userguide/genuserguide.py
reportlab/config.py
reportlab/demos/gadflypaper/gfe.py
reportlab/demos/odyssey/fodyssey.py
reportlab/demos/pythonpoint/pythonpoint.py
reportlab/lib/fonts.py
reportlab/lib/pagesizes.py
reportlab/lib/tocindex.py
reportlab/pdfbase/pdfdoc.py
reportlab/pdfgen/canvas.py
reportlab/pdfgen/fonts0.py
reportlab/platypus/doctemplate.py
reportlab/platypus/flowables.py
reportlab/platypus/tables.py
reportlab/platypus/test/testplatypus.py
reportlab/test/test_paragraphs.py
utils/simpledoc.py
--- a/docs/tools/rltemplate.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/docs/tools/rltemplate.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/tools/rltemplate.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/tools/rltemplate.py,v 1.8 2000/11/05 17:41:58 andy_robinson Exp $
+#$Header: /tmp/reportlab/docs/tools/rltemplate.py,v 1.9 2001/03/07 18:57:11 rgbecker Exp $
 # doc template for RL manuals.  Currently YAML is hard-coded
 #to use this, which is wrong.
 
@@ -9,11 +9,11 @@
 from reportlab.platypus import PageTemplate, \
      BaseDocTemplate, Frame, Paragraph
 from reportlab.lib.units import inch, cm
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
+from reportlab.config import defaultPageSize
 
 
 class FrontCoverTemplate(PageTemplate):
-    def __init__(self, id, pageSize=DEFAULT_PAGE_SIZE):
+    def __init__(self, id, pageSize=defaultPageSize):
         self.pageWidth = pageSize[0]
         self.pageHeight = pageSize[1]
         frame1 = Frame(inch,
@@ -44,7 +44,7 @@
     
 
 class OneColumnTemplate(PageTemplate):
-    def __init__(self, id, pageSize=DEFAULT_PAGE_SIZE):
+    def __init__(self, id, pageSize=defaultPageSize):
         self.pageWidth = pageSize[0]
         self.pageHeight = pageSize[1]
         frame1 = Frame(inch,
@@ -65,7 +65,7 @@
         canvas.restoreState()
 
 class TwoColumnTemplate(PageTemplate):
-    def __init__(self, id, pageSize=DEFAULT_PAGE_SIZE):
+    def __init__(self, id, pageSize=defaultPageSize):
         self.pageWidth = pageSize[0]
         self.pageHeight = pageSize[1]
         colWidth = 0.5 * (self.pageWidth - 2.25*inch)
--- a/docs/userguide/ch2_graphics.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/docs/userguide/ch2_graphics.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/userguide/ch2_graphics.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/userguide/ch2_graphics.py,v 1.9 2000/10/25 08:57:45 rgbecker Exp $
+#$Header: /tmp/reportlab/docs/userguide/ch2_graphics.py,v 1.10 2001/03/07 18:57:11 rgbecker Exp $
 from genuserguide import *
 
 heading1("Graphics and Text with $pdfgen$")
@@ -66,7 +66,7 @@
                  pagesize=(595.27,841.89),
                  bottomup = 1,
                  pageCompression=0,
-                 encoding=pdfdoc.DEFAULT_ENCODING,
+                 encoding=config.defaultEncoding,
                  verbosity=0):
                  """)
 
@@ -123,8 +123,8 @@
 disc("""The $encoding$ argument determines which font encoding
 is used for the standard fonts; this should correspond to
 the encoding on your system.  It has two values at present:
-$pdfdoc.WINANSI_ENCODING$ or $pdfdoc.MACROMAN_ENCODING$.  The
-$pdfdoc.DEFAULT_ENCODING$ above points to the former, which
+$'WinAnsiEncoding'$ or $'MacRomanEncoding'$.  The
+$config.defaultEncoding$ above points to the former, which
 is standard on Windows and many Unices (including Linux). If
 you are a Mac user and want to make a global change, modify the
 line at the top of <i>reportlab/pdfbase/pdfdoc.py</i> to switch it
--- a/docs/userguide/ch4_platypus_concepts.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/docs/userguide/ch4_platypus_concepts.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/userguide/ch4_platypus_concepts.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/userguide/ch4_platypus_concepts.py,v 1.9 2000/12/06 13:55:20 aaron_watters Exp $
+#$Header: /tmp/reportlab/docs/userguide/ch4_platypus_concepts.py,v 1.10 2001/03/07 18:57:11 rgbecker Exp $
 from genuserguide import *
 
 #####################################################################################################3
@@ -302,7 +302,7 @@
 
 eg("""
     BaseDocTemplate(self, filename,
-					pagesize=DEFAULT_PAGE_SIZE,
+					pagesize=defaultPageSize,
 					pageTemplates=[],
 					showBoundary=0,
 					leftMargin=inch,
--- a/docs/userguide/examples.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/docs/userguide/examples.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/userguide/examples.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/userguide/Attic/examples.py,v 1.16 2000/10/25 08:57:45 rgbecker Exp $
+#$Header: /tmp/reportlab/docs/userguide/Attic/examples.py,v 1.17 2001/03/07 18:57:11 rgbecker Exp $
 import string
 
 testannotations="""
@@ -771,9 +771,9 @@
 platypussetup = """
 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
 from reportlab.lib.styles import getSampleStyleSheet
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
+from reportlab.config import defaultPageSize
 from reportlab.lib.units import inch
-PAGE_HEIGHT=DEFAULT_PAGE_SIZE[1]; PAGE_WIDTH=DEFAULT_PAGE_SIZE[0]
+PAGE_HEIGHT=defaultPageSize[1]; PAGE_WIDTH=defaultPageSize[0]
 styles = getSampleStyleSheet()
 """
 platypusfirstpage = """
--- a/docs/userguide/genuserguide.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/docs/userguide/genuserguide.py	Wed Mar 07 18:57:12 2001 +0000
@@ -2,8 +2,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/userguide/genuserguide.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/userguide/genuserguide.py,v 1.38 2000/11/05 17:41:58 andy_robinson Exp $
-__version__=''' $Id: genuserguide.py,v 1.38 2000/11/05 17:41:58 andy_robinson Exp $ '''
+#$Header: /tmp/reportlab/docs/userguide/genuserguide.py,v 1.39 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: genuserguide.py,v 1.39 2001/03/07 18:57:11 rgbecker Exp $ '''
 
 
 __doc__ = """
@@ -20,7 +20,8 @@
 
 #from reportlab.platypus.doctemplate import SimpleDocTemplate
 from reportlab.lib.units import inch
-from reportlab.lib.pagesizes import letter, A4, A5, A3, DEFAULT_PAGE_SIZE  # latter two for testing
+from reportlab.lib.pagesizes import letter, A4, A5, A3  # latter two for testing
+from reportlab.config import defaultPageSize
 from reportlab.platypus import Paragraph, Spacer, Preformatted,\
             PageBreak, CondPageBreak, Flowable, Table, TableStyle, \
             NextPageTemplate, KeepTogether, Image, XPreformatted
@@ -426,5 +427,5 @@
             raise
         print 'set page size to',sys.argv[1]
     else:
-        (w, h) = DEFAULT_PAGE_SIZE
+        (w, h) = defaultPageSize
     run((w, h))
--- a/reportlab/config.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/config.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,2 +1,11 @@
+import sys
+from reportlab.lib import pagesizes
 shapeChecking = 1
-defaultEncoding = 'WinAnsi'  # 'WinAnsi' or 'MacRoman'
+defaultEncoding = 'WinAnsiEncoding'		# 'WinAnsi' or 'MacRoman'
+defaultPageSize=pagesizes.A4			#check in reportlab/lib/pagesizes for other possibilities
+
+#places to search for Type 1 Font files
+if sys.platform=='win32':
+	T1SearchPathPath=['c:\\Program Files\\Adobe\\Acrobat 4.0\\Resource\\Font']
+else:
+	T1SearchPathPath=[]
--- a/reportlab/demos/gadflypaper/gfe.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/demos/gadflypaper/gfe.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,16 +1,16 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/demos/gadflypaper/gfe.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/demos/gadflypaper/gfe.py,v 1.12 2000/10/25 08:57:44 rgbecker Exp $
-__version__=''' $Id: gfe.py,v 1.12 2000/10/25 08:57:44 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/reportlab/demos/gadflypaper/gfe.py,v 1.13 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: gfe.py,v 1.13 2001/03/07 18:57:11 rgbecker Exp $ '''
 __doc__=''
 
 #REPORTLAB_TEST_SCRIPT
 import sys
 from reportlab.platypus import *
 from reportlab.lib.styles import getSampleStyleSheet
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
-PAGE_HEIGHT=DEFAULT_PAGE_SIZE[1]
+from reportlab.config import defaultPageSize
+PAGE_HEIGHT=defaultPageSize[1]
 
 styles = getSampleStyleSheet()
 
--- a/reportlab/demos/odyssey/fodyssey.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/demos/odyssey/fodyssey.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/demos/odyssey/fodyssey.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/demos/odyssey/fodyssey.py,v 1.14 2000/10/25 08:57:44 rgbecker Exp $
-__version__=''' $Id: fodyssey.py,v 1.14 2000/10/25 08:57:44 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/reportlab/demos/odyssey/fodyssey.py,v 1.15 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: fodyssey.py,v 1.15 2001/03/07 18:57:11 rgbecker Exp $ '''
 __doc__=''
 
 #REPORTLAB_TEST_SCRIPT
@@ -11,7 +11,6 @@
 from reportlab.lib.units import inch
 from reportlab.lib.styles import getSampleStyleSheet
 from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
 
 styles = getSampleStyleSheet()
 
--- a/reportlab/demos/pythonpoint/pythonpoint.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/demos/pythonpoint/pythonpoint.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/demos/pythonpoint/pythonpoint.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/demos/pythonpoint/Attic/pythonpoint.py,v 1.29 2000/12/14 17:11:03 rgbecker Exp $
-__version__=''' $Id: pythonpoint.py,v 1.29 2000/12/14 17:11:03 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/reportlab/demos/pythonpoint/Attic/pythonpoint.py,v 1.30 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: pythonpoint.py,v 1.30 2001/03/07 18:57:11 rgbecker Exp $ '''
 # xml parser stuff for PythonPoint
 # PythonPoint Markup Language!
 __doc__="""
@@ -59,7 +59,7 @@
 from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
 from reportlab.lib import styles
 import stdparser 
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
+from reportlab.config import defaultPageSize
 from reportlab.lib import colors
 
 class PPPresentation:
@@ -75,8 +75,8 @@
         self.showOutline = 1   #should it be displayed when opening?
         self.compression = 1        
         #assume landscape        
-        self.pageWidth = DEFAULT_PAGE_SIZE[1]  
-        self.pageHeight = DEFAULT_PAGE_SIZE[0]  
+        self.pageWidth = defaultPageSize[1]  
+        self.pageHeight = defaultPageSize[0]  
 
     def save(self):
         """This writes out the PDF document"""
--- a/reportlab/lib/fonts.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/lib/fonts.py	Wed Mar 07 18:57:12 2001 +0000
@@ -2,8 +2,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/lib/fonts.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/lib/fonts.py,v 1.4 2001/03/02 15:35:43 rgbecker Exp $
-__version__=''' $Id: fonts.py,v 1.4 2001/03/02 15:35:43 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/reportlab/lib/fonts.py,v 1.5 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: fonts.py,v 1.5 2001/03/07 18:57:11 rgbecker Exp $ '''
 import string, sys, os
 ###############################################################################
 #	A place to put useful font stuff
@@ -51,7 +51,7 @@
 			('zapfdingbats', 1, 0) :'ZapfDingbats',
 			('zapfdingbats', 0, 1) :'ZapfDingbats',
 			('zapfdingbats', 1, 1) :'ZapfDingbats',
-	  }
+			}
 
 _ps2tt_map={}
 for k,v in _tt2ps_map.items():
@@ -74,33 +74,30 @@
 
 #this maps fontnames to the equivalent filename root.
 _font2fnrMap={
-	'symbol': 'Sy______',
-	'zapfdingbats': 'Zd______',
-	'helvetica': '_a______',
-	'helvetica-bold': '_ab_____',
-	'helvetica-boldoblique': '_abi____',
-	'helvetica-oblique': '_ai_____',
-	'times-bold': '_eb_____',
-	'times-bolditalic': '_ebi____',
-	'times-italic': '_ei_____',
-	'times-roman': '_er_____',
-	'courier-bold': 'cob_____',
-	'courier-boldoblique': 'cobo____',
-	'courier': 'com_____',
-	'courier-oblique': 'coo_____',
+	'symbol':					'Sy______',
+	'zapfdingbats':				'Zd______',
+	'helvetica':				'_a______',
+	'helvetica-bold':			'_ab_____',
+	'helvetica-boldoblique':	'_abi____',
+	'helvetica-oblique':		'_ai_____',
+	'times-bold':				'_eb_____',
+	'times-bolditalic':			'_ebi____',
+	'times-italic':				'_ei_____',
+	'times-roman':				'_er_____',
+	'courier-bold':				'cob_____',
+	'courier-boldoblique':		'cobo____',
+	'courier':					'com_____',
+	'courier-oblique':			'coo_____',
 	}
 
-if sys.platform=='win32':
-	_T1Path=['c:\\program Files\\Adobe\\Acrobat 4.0\\Resource\\Font']
-else:
-	_T1Path=[]
-
 def _findFNR(fontName):
 	return _font2fnrMap[string.lower(fontName)]
 
-def findPFB(fontName):
-	n = _findFNR(fontName)+'.pfb'
-	for d in _T1Path:
+def findT1File(fontName,ext='.pfb'):
+	from reportlab.config import T1SearchPath
+	assert T1SearchPath!=[]
+	n = _findFNR(fontName)+ext
+	for d in T1SearchPath:
 		f = os.path.join(d,n)
 		if os.path.isfile(f): return f
 	return None
--- a/reportlab/lib/pagesizes.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/lib/pagesizes.py	Wed Mar 07 18:57:12 2001 +0000
@@ -2,12 +2,12 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/lib/pagesizes.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/lib/pagesizes.py,v 1.5 2000/10/25 08:57:45 rgbecker Exp $
+#$Header: /tmp/reportlab/reportlab/lib/pagesizes.py,v 1.6 2001/03/07 18:57:11 rgbecker Exp $
 
 """This module defines a few common page sizes in points (1/72 inch).
 To be expanded to include things like label sizes, envelope windows
 etc."""
-__version__=''' $Id: pagesizes.py,v 1.5 2000/10/25 08:57:45 rgbecker Exp $ '''
+__version__=''' $Id: pagesizes.py,v 1.6 2001/03/07 18:57:11 rgbecker Exp $ '''
 
 from reportlab.lib.units import cm, inch
 
@@ -34,10 +34,6 @@
 B1 = (_BH*4, _BW*2)
 B0 = (_BW*4, _BH*4)
 
-#change this to suit your average needs
-DEFAULT_PAGE_SIZE = A4
-
 def landscape(pagesize):
-    """Use this to invert any pagesize"""
-    return (pagesize[1], pagesize[0])
-
+	"""Use this to invert any pagesize"""
+	return (pagesize[1], pagesize[0])
--- a/reportlab/lib/tocindex.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/lib/tocindex.py	Wed Mar 07 18:57:12 2001 +0000
@@ -2,8 +2,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/lib/tocindex.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/lib/tocindex.py,v 1.5 2000/12/14 17:11:03 rgbecker Exp $
-__version__=''' $Id: tocindex.py,v 1.5 2000/12/14 17:11:03 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/reportlab/lib/tocindex.py,v 1.6 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: tocindex.py,v 1.6 2001/03/07 18:57:11 rgbecker Exp $ '''
 __doc__=''
 """
 This module will contain standard Table of Contents and Index objects.
@@ -20,8 +20,8 @@
 from reportlab.platypus import tables
 from reportlab.lib import enums
 from reportlab.lib import colors
-import reportlab.lib.pagesizes
 from reportlab.lib.units import inch, cm
+from reportlab.config import defaultPageSize
 
     ##############################################################
     #
@@ -175,7 +175,7 @@
     #
     # everything from here down is concerned with creating a good example document
     # i.e. test code as well as tutorial
-PAGE_HEIGHT = reportlab.lib.pagesizes.DEFAULT_PAGE_SIZE[1]
+PAGE_HEIGHT = defaultPageSize[1]
 def getSampleTOCData(depth=3):
     """Returns a longish block of page numbers and headings over 3 levels"""
     from random import randint
--- a/reportlab/pdfbase/pdfdoc.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/pdfbase/pdfdoc.py	Wed Mar 07 18:57:12 2001 +0000
@@ -2,8 +2,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfbase/pdfdoc.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/pdfbase/pdfdoc.py,v 1.39 2001/03/06 17:38:15 andy_robinson Exp $
-__version__=''' $Id: pdfdoc.py,v 1.39 2001/03/06 17:38:15 andy_robinson Exp $ '''
+#$Header: /tmp/reportlab/reportlab/pdfbase/pdfdoc.py,v 1.40 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: pdfdoc.py,v 1.40 2001/03/07 18:57:11 rgbecker Exp $ '''
 __doc__=""" 
 PDFgen is a library to generate PDF files containing text and graphics.  It is the 
 foundation for a complete reporting solution in Python.  
@@ -19,7 +19,7 @@
 """
 """extremely anally  retentive structured version of pdfdoc"""
 
-DEFAULT_ENCODING = 'WinAnsiEncoding' #hack here for a system wide change
+from reportlab import config
 ALLOWED_ENCODINGS = ('WinAnsiEncoding', 'MacRomanEncoding')
 
 PDFError = 'PDFError'
@@ -112,7 +112,7 @@
     # set this to define filters 
     defaultStreamFilters = None
     pageCounter = 1
-    def __init__(self, encoding=DEFAULT_ENCODING, dummyoutline=0, doFonts=0):
+    def __init__(self, encoding=config.defaultEncoding, dummyoutline=0, doFonts=0):
         #self.defaultStreamFilters = [PDFBase85Encode, PDFZCompress] # for testing!
         #self.defaultStreamFilters = [PDFZCompress] # for testing!
         assert encoding in ['MacRomanEncoding',
@@ -1458,7 +1458,7 @@
         PD = PDFDictionary(D)
         return PD.format(document)
 
-def MakeStandardEnglishFontObjects(document, encoding=DEFAULT_ENCODING):
+def MakeStandardEnglishFontObjects(document, encoding=config.defaultEncoding):
     # make the standard fonts and the standard font dictionary
     if encoding not in ALLOWED_ENCODINGS:
         raise ValueError, "bad encoding %s" % repr(encoding)
@@ -1473,7 +1473,7 @@
             # they should be taken in the order they appear in the font file
             F.Encoding = PDFName('StandardEncoding')
         else:
-            F.Encoding = PDFName(DEFAULT_ENCODING)
+            F.Encoding = PDFName(config.defaultEncoding)
         F.__Comment__ = "Standard English Font %s" % repr(name)
         fname = "F"+repr(count)
         F.Name = fname
--- a/reportlab/pdfgen/canvas.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/pdfgen/canvas.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfgen/canvas.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/pdfgen/canvas.py,v 1.63 2001/03/06 17:38:15 andy_robinson Exp $
-__version__=''' $Id: canvas.py,v 1.63 2001/03/06 17:38:15 andy_robinson Exp $ '''
+#$Header: /tmp/reportlab/reportlab/pdfgen/canvas.py,v 1.64 2001/03/07 18:57:11 rgbecker Exp $
+__version__=''' $Id: canvas.py,v 1.64 2001/03/07 18:57:11 rgbecker Exp $ '''
 __doc__=""" 
 The Canvas object is the primary interface for creating PDF files. See
 doc/userguide.pdf for copious examples.
@@ -18,6 +18,7 @@
 from types import *
 from math import sin, cos, tan, pi, ceil
 
+from reportlab import config
 from reportlab.pdfbase import pdfutils
 from reportlab.pdfbase import pdfdoc
 from reportlab.pdfbase import pdfmetrics
@@ -50,7 +51,6 @@
             (1, 1, FILL_NON_ZERO) : 'B',  #Stroke and Fill
             }
 
-
 class Canvas:
     """This class is the programmer's interface to the PDF file format.  Methods
     are (or will be) provided here to do just about everything PDF can do.
@@ -102,7 +102,7 @@
                  pagesize=(595.27,841.89),
                  bottomup = 1,
                  pageCompression=1,
-                 encoding=pdfdoc.DEFAULT_ENCODING,
+                 encoding=config.defaultEncoding,
                  verbosity=0):
         """Create a canvas of a given size. etc.
         Most of the attributes are private - we will use set/get methods
--- a/reportlab/pdfgen/fonts0.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/pdfgen/fonts0.py	Wed Mar 07 18:57:12 2001 +0000
@@ -2,7 +2,7 @@
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfgen/fonts0.py?cvsroot=reportlab
 #$Header $
-__version__=''' $Id: fonts0.py,v 1.1 2001/03/06 17:38:15 andy_robinson Exp $ '''
+__version__=''' $Id: fonts0.py,v 1.2 2001/03/07 18:57:11 rgbecker Exp $ '''
 __doc__=""" 
 This is an attempt to break out fonts as user-accessible objects.  You can explicitly
 construct a font object with any desired encoding and add it to the document.  The
@@ -82,6 +82,7 @@
 import types
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfbase import pdfdoc
+from reportlab import config
 
 class Encoding:
     """This is an abstract base class for encodings.  """
@@ -117,7 +118,7 @@
             assert len(vector) == 256, 'Encoding vector must have 256 elements'
             self.vector = vector[:]  # TAKE A COPY so they don't mess up pdfmetrics
             self._encodingName = None
-            self._baseEncodingName = pdfdoc.DEFAULT_ENCODING
+            self._baseEncodingName = config.defaultEncoding
         elif type(vector) is types.StringType:
             try:
                 self.vector = pdfmetrics.encodings[vector][:]  # TAKE A COPY!
@@ -205,13 +206,10 @@
         if curRange:
             ranges.append(curRange)
         return ranges
-                
-        
+
 WinAnsiEncoding = SingleByteEncoding('WinAnsiEncoding')
 MacRomanEncoding = SingleByteEncoding('MacRomanEncoding')
-defaultEncoding = SingleByteEncoding(pdfdoc.DEFAULT_ENCODING)
-
-        
+defaultEncoding = SingleByteEncoding(config.defaultEncoding)
 
 class Font:
     """Base class for a font.  Not sure yet what it needs to do"""
@@ -407,4 +405,4 @@
 
         
     print 'saved testfonts.pdf'
-    
\ No newline at end of file
+    
--- a/reportlab/platypus/doctemplate.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/platypus/doctemplate.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,9 +1,9 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/doctemplate.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/platypus/doctemplate.py,v 1.36 2001/03/06 17:38:15 andy_robinson Exp $
+#$Header: /tmp/reportlab/reportlab/platypus/doctemplate.py,v 1.37 2001/03/07 18:57:11 rgbecker Exp $
 
-__version__=''' $Id: doctemplate.py,v 1.36 2001/03/06 17:38:15 andy_robinson Exp $ '''
+__version__=''' $Id: doctemplate.py,v 1.37 2001/03/07 18:57:11 rgbecker Exp $ '''
 
 __doc__="""
 This module contains the core structure of platypus.
@@ -32,7 +32,7 @@
 from reportlab.platypus.flowables import *
 from reportlab.platypus.paragraph import Paragraph
 from reportlab.platypus.frames import Frame
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
+from reportlab.config import defaultPageSize
 import reportlab.lib.sequencer
 
 from types import *
@@ -129,7 +129,7 @@
 	derived classes can also implement beforeDrawPage and afterDrawPage if they want
 	"""
 	def __init__(self,id=None,frames=[],onPage=_doNothing, onPageEnd=_doNothing,
-				 pagesize=DEFAULT_PAGE_SIZE):
+				 pagesize=defaultPageSize):
 		if type(frames) not in (ListType,TupleType): frames = [frames]
 		assert filter(lambda x: not isinstance(x,Frame), frames)==[], "frames argument error"
 		self.id = id
@@ -202,7 +202,7 @@
 	title: Internal title for document (does not automatically display on any page)
 	author: Internal author for document (does not automatically display on any page)
 	"""
-	_initArgs = {	'pagesize':DEFAULT_PAGE_SIZE,
+	_initArgs = {	'pagesize':defaultPageSize,
 					'pageTemplates':[],
 					'showBoundary':0,
 					'leftMargin':inch,
--- a/reportlab/platypus/flowables.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/platypus/flowables.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/flowables.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/platypus/flowables.py,v 1.15 2000/12/29 02:06:13 andy_robinson Exp $
-__version__=''' $Id: flowables.py,v 1.15 2000/12/29 02:06:13 andy_robinson Exp $ '''
+#$Header: /tmp/reportlab/reportlab/platypus/flowables.py,v 1.16 2001/03/07 18:57:12 rgbecker Exp $
+__version__=''' $Id: flowables.py,v 1.16 2001/03/07 18:57:12 rgbecker Exp $ '''
 __doc__="""
 A flowable is a "floating element" in a document whose exact position is determined by the
 other elements that precede it, such as a paragraph, a diagram interspersed between paragraphs,
@@ -32,8 +32,8 @@
 from reportlab.lib.colors import red
 from reportlab.pdfbase import pdfutils
 
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
-PAGE_HEIGHT = DEFAULT_PAGE_SIZE[1]
+from reportlab.config import defaultPageSize
+PAGE_HEIGHT = defaultPageSize[1]
 
 #############################################################
 #	Flowable Objects - a base class and a few examples.
@@ -349,4 +349,4 @@
 	def draw(self):
 		exec self.command in globals(), {'canvas':self.canv}
 
-	
\ No newline at end of file
+	
--- a/reportlab/platypus/tables.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/platypus/tables.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/tables.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/platypus/tables.py,v 1.34 2000/12/13 23:31:18 aaron_watters Exp $
-__version__=''' $Id: tables.py,v 1.34 2000/12/13 23:31:18 aaron_watters Exp $ '''
+#$Header: /tmp/reportlab/reportlab/platypus/tables.py,v 1.35 2001/03/07 18:57:12 rgbecker Exp $
+__version__=''' $Id: tables.py,v 1.35 2001/03/07 18:57:12 rgbecker Exp $ '''
 __doc__="""
 Tables are created by passing the constructor a tuple of column widths, a tuple of row heights and the data in
 row order. Drawing of the table can be controlled by using a TableStyle instance. This allows control of the
@@ -20,7 +20,6 @@
 from reportlab.platypus import *
 from reportlab.lib.styles import PropertySet, getSampleStyleSheet
 from reportlab.lib import colors
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
 from reportlab.pdfbase import pdfmetrics
 import operator, string
 
--- a/reportlab/platypus/test/testplatypus.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/platypus/test/testplatypus.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/test/testplatypus.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/platypus/test/Attic/testplatypus.py,v 1.21 2000/12/14 17:11:03 rgbecker Exp $
-__version__=''' $Id: testplatypus.py,v 1.21 2000/12/14 17:11:03 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/reportlab/platypus/test/Attic/testplatypus.py,v 1.22 2001/03/07 18:57:12 rgbecker Exp $
+__version__=''' $Id: testplatypus.py,v 1.22 2001/03/07 18:57:12 rgbecker Exp $ '''
 
 #tests and documents Page Layout API
 __doc__="""This is not obvious so here's a brief explanation.  This module is both
@@ -21,8 +21,8 @@
 from reportlab.lib.units import inch, cm
 from reportlab.lib.styles import PropertySet, getSampleStyleSheet, ParagraphStyle
 from reportlab.lib import colors
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
-PAGE_HEIGHT = DEFAULT_PAGE_SIZE[1]
+from reportlab.config import defaultPageSize
+PAGE_HEIGHT = defaultPageSize[1]
 
 #################################################################
 #
--- a/reportlab/test/test_paragraphs.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/reportlab/test/test_paragraphs.py	Wed Mar 07 18:57:12 2001 +0000
@@ -6,9 +6,9 @@
 from reportlab.lib.units import inch
 from reportlab.lib.colors import red, black, navy, white
 from reportlab.lib.randomtext import randomText
-from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
+from reportlab.config import defaultPageSize
 
-(PAGE_WIDTH, PAGE_HEIGHT) = DEFAULT_PAGE_SIZE
+(PAGE_WIDTH, PAGE_HEIGHT) = defaultPageSize
 
 
 def myFirstPage(canvas, doc):
--- a/utils/simpledoc.py	Wed Mar 07 18:55:26 2001 +0000
+++ b/utils/simpledoc.py	Wed Mar 07 18:57:12 2001 +0000
@@ -1,8 +1,8 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/utils/simpledoc.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/utils/simpledoc.py,v 1.4 2000/10/25 08:57:46 rgbecker Exp $
-__version__=''' $Id: simpledoc.py,v 1.4 2000/10/25 08:57:46 rgbecker Exp $ '''
+#$Header: /tmp/reportlab/utils/simpledoc.py,v 1.5 2001/03/07 18:57:12 rgbecker Exp $
+__version__=''' $Id: simpledoc.py,v 1.5 2001/03/07 18:57:12 rgbecker Exp $ '''
 __doc__="""
 simple document formatting (quickhack) for pdf:
 
@@ -25,6 +25,7 @@
 import string
 from reportlab.platypus import *
 from reportlab.lib.styles import getSampleStyleSheeet
+from reportlab.config import defaultPageSize
 
 do_images = 1
 
@@ -144,7 +145,7 @@
 		self.finish(tofilename)
 
 	def finish(self, tofilename):
-		doc = SimpleDocTemplate(tofilename, DEFAULT_PAGE_SIZE)
+		doc = SimpleDocTemplate(tofilename, defaultPageSize)
 		doc.onFirstPage = self.myFirstPage
 		doc.onLaterPages = self.mylaterPages
 		doc.leftMargin = 144