Re: TypeError: can only concatenate list (not "tuple") to list

2010-01-04 Thread David Williams
> Is there any reason for this error? Apart from "nobody cared to write the > code" > > py> [1,2,3] + (4,5) > Traceback (most recent call last): > File "", line 1, in > TypeError: can only concatenate list (not "tuple") to list > > In-place addition += does work: > > py> a = [1,2,3] > py> a

Re: TypeError: can only concatenate list (not "tuple") to list

2010-01-04 Thread David Williams
> Is there any reason for this error? Apart from "nobody cared to write the > code" > > py> [1,2,3] + (4,5) > Traceback (most recent call last): > File "", line 1, in > TypeError: can only concatenate list (not "tuple") to list > > In-place addition += does work: > > py> a = [1,2,3] > py> a +

Re: a 100-line indentation-based preprocessor for HTML

2009-11-27 Thread David Williams
You might want to take a look at this: http://www.ghrml.org/ David > Python has this really neat idea called indentation-based syntax, and > there are folks that have caught on to this idea in the HTML > community. > > AFAIK the most popular indentation-based solution for generating HTML > is a

Re: Render a xml graph as an image

2009-11-27 Thread David Williams
Maybe I am missing something, but according to this example, http://code.google.com/p/python-graph/wiki/Example, python-graph can export to at least PNG format. Another option, transform the XML into GraphML (http://graphml.graphdrawing.org/) using XSLT (assuming it is not already in that format),

Re: Editing PDF files usig Python

2009-11-07 Thread David Williams
Maybe try ReportLab, its pretty much the most advanced Python PDF toolkit I know of: http://www.reportlab.org/ > Hi All, > > Greetings, > > I am a newbie in Python, i have a requirement to develop a component in > python that can "text" water mark the PDF file both digitallly and > visibly. > I h