[reportlab-users] The extra bracket !!

Andy Robinson andy at reportlab.com
Fri Jun 8 04:02:59 EDT 2007


On 08/06/07, Dinu Gherman <gherman at darwin.in-berlin.de> wrote:

> David Frank:

>

> > Is there someone who could tell me how I can get around this. Is there

> > something in Python to add the missing curvy brackets (the root of the

> > problem) or something in Reportlab to just ignore these curvy brackets

> > and take the data as [3, 4, 5, 6, 7] instead of [(3, 4, 5, 6, 7)]?

>

> You can do the following:

>

> >>> aList = [1, 2, 3]

> >>> newList = [tuple(aList)]

> >>> newList

> [(1, 2, 3)]

That works, but there is no specific requirement to have a tuple inside a list.
The requirement is that you present a 2d array, since charts may have
several series of data; lists or tuples are both fine.

so
chart.data = [myList]
will do the job too.

- Andy


More information about the reportlab-users mailing list