[reportlab-users] pythonpoint with stringIO
vicky lupien
reportlab-users@reportlab.com
Fri, 03 Oct 2003 12:19:26 +0000
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)
Traceback (most recent call last):
File
"C:\PROGRA~1\Python22\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
exec codeObject in __main__.__dict__
File "D:\DDI\Projets\Projets Vicky\XML TO PDF\test.py", line 167, in ?
connection.close()
File "C:\PROGRA~1\Python22\reportlab\tools\pythonpoint\pythonpoint.py",
line 946, in process
return _process(rawdata, datafilename, notes, handout, printout, cols,
verbose, outDir)
File "C:\PROGRA~1\Python22\reportlab\tools\pythonpoint\pythonpoint.py",
line 954, in _process
pres.sourceFilename = datafilename
AttributeError: 'NoneType' object has no attribute 'sourceFilename'
From: "Andy Robinson" <andy@reportlab.com>
Reply-To: reportlab-users@reportlab.com
To: <reportlab-users@reportlab.com>
Subject: RE: [reportlab-users] pythonpoint with stringIO
Date: Thu, 2 Oct 2003 23:08:57 +0100
> I want to use pythonpoint from an other python script without
> having an xml
> file in entry (just with a stringIO). I use prettyprint for making my
> stringIO.
You can pass in any file-like object to the process(...) function
in pythonpoint.py. instead of a filename. It has been like this for
some time.
- Andy Robinson
_______________________________________________
reportlab-users mailing list
reportlab-users@reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
_________________________________________________________________
MSN Messenger : discutez en direct avec vos amis !
http://messenger.fr.msn.ca/