#Autogenerated by ReportLab guiedit do not edit
import os, sys, __main__
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.rl_config import T1SearchPath, TTFSearchPath
import reportlab, rlextra

class DiagnosticDrawing(_DrawingEditorMixin,Drawing):
	def __init__(self,width=400,height=200,*args,**kw):
		Drawing.__init__(*(self,width,height)+args, **kw)
		fs = 10
		ld = 1.2*fs
		sysL = ['byteorder', 'copyright', 'displayhook''exec_prefix', 'executable', 'hexversion', 'maxint', 'maxunicode', 'platform', 'prefix', 'version', 'version_info', 'warnoptions']
		n0 = 7+len(sysL)
		self.width=6.5*72
		self.height = (n0+len(sys.path)+len(sys.argv)+len(T1SearchPath)+len(TTFSearchPath))*ld
		self._add(self,String(10,self.height-ld,'cwd="%s"' % os.getcwd(),fontSize=fs), name=None,validate=None,desc=None)
		self._add(self,String(10,self.height-2*ld,'argv[0]="%s"' % sys.argv[0],fontSize=fs), name=None,validate=None,desc=None)
		self._add(self,String(10,self.height-3*ld,'sample path="%s"' % getattr(__main__,'_guiedit_sample_path','<unknown>'),fontSize=fs), name=None,validate=None,desc=None)
		self._add(self,String(10,self.height-4*ld,'_rl_embed_location="%s"' % getattr(__main__,'_rl_embed_location','<unknown>'),fontSize=fs), name=None,validate=None,desc=None)
		self._add(self,String(10,self.height-5*ld,'reportlab location="%s"' % os.path.dirname(reportlab.__file__),fontSize=fs), name=None,validate=None,desc=None)
		self._add(self,String(10,self.height-6*ld,'rlextra location="%s"' % os.path.dirname(rlextra.__file__),fontSize=fs), name=None,validate=None,desc=None)
		if 'do error' in sys.argv: raise ValueError('Deliberate Error For Testing')
		for i in range(len(sysL)): self._add(self,String(10,self.height-(7+i)*ld,'sys.%s="%s"' % (sysL[i],getattr(sys,sysL[i],'<missing>')),fontSize=fs), name=None,validate=None,desc=None)
		for i in range(len(sys.argv)): self._add(self,String(10,self.height-(n0+i)*ld,'sys.argv[%d]="%s"' % (i,sys.argv[i]),fontSize=fs), name=None,validate=None,desc=None)
		for i in range(len(sys.path)): self._add(self,String(10,self.height-(n0+i+len(sys.argv))*ld,'sys.path[%d]="%s"' % (i,sys.path[i]),fontSize=fs), name=None,validate=None,desc=None)
		for i in range(len(T1SearchPath)): self._add(self,String(10,self.height-ld*(n0+i+len(sys.argv)+len(sys.path)),'T1SearchPath[%d]="%s"' % (i,T1SearchPath[i]),fontSize=fs), name=None,validate=None,desc=None)
		for i in range(len(TTFSearchPath)): self._add(self,String(10,self.height-ld*(n0+i+len(sys.argv)+len(sys.path)+len(T1SearchPath)),'TTFSearchPath[%d]="%s"' % (i,TTFSearchPath[i]),fontSize=fs), name=None,validate=None,desc=None)

if __name__=="__main__": #NORUNTESTS
	DiagnosticDrawing().save(formats=['pdf'],outDir='.',fnRoot=None)

