#copyright ReportLab Inc. 2000-2001
#see license.txt for license details
#history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab
#$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.15 2001/08/03 10:21:12 rgbecker Exp $
import sys, string
from reportlab.lib import pagesizes

def _setOpt(name, value, conv=None):
	'''set a module level value from environ/default'''
	from os import environ
	ename = 'RL_'+name
	if environ.has_key(ename):
		value = environ[ename]
	if conv: value = conv(value)
	globals()[name] = value


def	_startUp():
	'''this function allows easy resetting to the global defaults'''
	############################################################
	# If the environment contains 'RL_xxx' then we use the value
	# else we use the given default
	_setOpt('shapeChecking', 1, int)
	_setOpt('defaultEncoding', 'WinAnsiEncoding')							# 'WinAnsi' or 'MacRoman'
	_setOpt('pageCompression',1,int)										#the default page compression mode
	_setOpt('defaultPageSize','A4',lambda v,M=pagesizes: getattr(M,v))		#check in reportlab/lib/pagesizes
	_setOpt('defaultImageCaching',0,int)			#set to zero to remove those annoying cached images
	_setOpt('PIL_WARNINGS',1,int)					#set to zero to remove those annoying warnings
	_setOpt('ZLIB_WARNINGS',1,int)
	_setOpt('warnOnMissingFontGlyphs',1,int)		# if 1, warns of each missing glyph
	_setOpt('_verbose',0,int)

	#places to search for Type 1 Font files
	if sys.platform=='win32':
		T1SearchPath=['c:\\Program Files\\Adobe\\Acrobat 4.0\\Resource\\Font']
	elif sys.platform in ('linux2',):
		T1SearchPath=['/usr/lib/Acrobat4/Resource/Font']
	elif sys.platform=='mac':	# we must be able to do better than this
		import os
		diskName = string.split(os.getcwd(), ':')[0]
		fontDir = diskName + ':Applications:Python 2.1:reportlab:fonts'
		T1SearchPath = [fontDir]   # tba
		PIL_WARNINGS = 0 # PIL is not packagized in the Mac Python build
else:
		T1SearchPath=[]
	_setOpt('T1SearchPath',T1SearchPath)

sys_version = string.split(sys.version)[0]		#strip off the other garbage
_startUp()

@@ -219,9 +219,9 @@
  1.1
-5
+6
  200
@@ -230,18 +230,18 @@
 08/0
-3 10:21:12
+7 15:40:44
  rgb
@@ -551,16 +551,89 @@
  value%0A%0A
+sys_version = string.split(sys.version)%5B0%5D%09%09#strip off the other garbage%0A
 %0Adef%09_st
@@ -1644,16 +1644,27 @@
 linux2',
+'freebsd4',
 ):%0A%09%09T1S
@@ -1885,11 +1885,10 @@
 hon 
-2.1
+%25s
 :rep
@@ -1900,16 +1900,30 @@
 b:fonts'
+ %25 sys_version
 %0A%09%09T1Sea
@@ -2020,9 +2020,10 @@
 uild
-%0D
+%0A%09
 else
@@ -2047,118 +2047,133 @@
 %5B%5D%0A%09
-_setOpt('T1SearchPath',T1SearchPath)%0A%0Asys_version = string.split(sys.version)%5B0%5D%09%09#strip off the other garbage
+%09#raise ValueError, 'Please add a proper T1SearchPath for your system to rl_config.py'%0A%09_setOpt('T1SearchPath',T1SearchPath)%0A
 %0A_st

Fix garbaged else clause