[reportlab-users] Pythonpoint: mods to suport path in stylesheet tags
Francesco Pierfederici
reportlab-users@reportlab.com
Sun, 3 Oct 2004 12:00:28 -0700
Hi,
I just started using PythonPoint (and I love it!). One thing I noticed
is that specifying a path in the stylesheet tag would cause an error:
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/reportlab/tools/pythonpoint/stdparser.py", line
342, in start_stylesheet
path.append('styles')
AttributeError: 'str' object has no attribute 'append'
Without knowing any better, I "fixed" it with a simple modification:
--- ORIGINAL_stdparser.py Sun Oct 3 11:51:25 2004
+++ /Library/Python/2.3/reportlab/tools/pythonpoint/stdparser.py
Sun Oct 3 11:51:48 2004
@@ -339,6 +339,8 @@
path = self._arg('stylesheet',args,'path')
if path=='None':
path = []
+ if (isinstance (path, str)):
+ path = [path]
path.append('styles')
path.append(os.getcwd())
modulename = self._arg('stylesheet', args, 'module')
Sorry if I missed something obvious and this is not needed!
Cheers
Francesco