[reportlab-users] pythonpoint with stringIO
Robin Becker
reportlab-users@reportlab.com
Fri, 3 Oct 2003 14:52:34 +0100
In article <BAY1-F914HGXAwxXSXI0000a0e5@hotmail.com>, vicky lupien
<lupien_v_31@hotmail.com> writes
>I try this and I get an error from pythonpoint. Here my code from the script
>that call python point and the error that I got:
>
>import cStringIO
>strIO=cStringIO.StringIO()
>PrettyPrint(doc,stream=strIO,encoding='iso-8859-1')
>
>pythonpoint.process(strIO)
>
>O
K I think I may have it. You are writing to strIO. That means you need
to do strIO.seek(0) before reading. Try
strIO.seek(0)
before the pythonpoint.process
--
Robin Becker