[reportlab-users] PythonPoint Philosophy

Tim Roberts reportlab-users@reportlab.com
Fri, 8 Nov 2002 21:34:54 -0800


I have a somewhat blasphemous question about PythonPoint.

I've been thinking about ways to create and manage presentations in 
PythonPoint, because creating XML by hand is a bit error-prone, and 
PythonPoint isn't always forthcoming about XML problems.

So, I thought to myself, I can create some Python classes that wrap the
various attributes, write my presentation as a Python script, and have it
generate the XML.

Then, it occurred to me how silly it was to have Python create XML, just to
be cracked by another Python program, which would then create the PDF.

So, my fundamental question is: why XML for PythonPoint?  Why not just
make it a series of classes, like PDFGen itself?

   p = Presentation()
   s = Section( 'first', style='standard' )
   s.append( 
     Slide( name='Introduction', ... 
       Para( "This is bullet item 1", style="Bullet" ),
       Para( "This is bullet item 2", style="Bullet" )
     )
   )
   p.append( s )

I think it would be easier to create and easier to edit, you'd get bette
r diagnostics, and it would be faster to boot.

What does XML do for me?
--
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.