Yes, re.sub(..., flags=) is a parameter since python 2.7
For older python, flags can be embeded, re.DOTALL becomes '(?s)':
color += re.sub('(.).',lambda m: m.group(1),line, flags=re.DOTALL)
could be replaced by:
color += re.sub('(?s)(.).',lambda m: m.group(1),line)
If this works, fpdf.py could
uhm, seemed a different problem: according to
http://docs.python.org/2/library/re.html the "flags" parameter was added
only in python 2.7
On Thursday, November 29, 2012 2:55:48 PM UTC+1, carlo wrote:
>
> Found: it seems a problem with 32 bit png files. When converted to 24 bit,
> pdf rendering
Found: it seems a problem with 32 bit png files. When converted to 24 bit,
pdf rendering was ok. Thank you.
Il giorno giovedì 29 novembre 2012 13:45:08 UTC+1, José Luis Redrejo
Rodríguez ha scritto:
>
> Hi Carlo
> I'm using fpdf without any problem, so I guess the reason is in some of
> the dat
Thank you José, this is strange because with 1.9.4 I have no problem.
This is the core part of the function: in the html view I have a link to
generate the pdf.
## Before I create a table for html rendering
if request.extension=="pdf":
import os
from gluon.contrib.pyfpdf import FP
Hi Carlo
I'm using fpdf without any problem, so I guess the reason is in some of the
data you're passing to fpdf.
The code of the controller would be needed to can lend you a hand.
Regards
2012/11/29 carlo
> No error with web2py 1.9.4.
>
> With 2.2.1 I got this with Python 2.5 and Python 2.6
>
No error with web2py 1.9.4.
With 2.2.1 I got this with Python 2.5 and Python 2.6
Traceback (most recent call last):
File "C:\Python25\web2py\gluon\restricted.py", line 212, in restricted
exec ccode in environment
File "C:/Python25/web2py/applications/Hcontrol/controllers/default.py"
6 matches
Mail list logo