python reportlab: how can I custom table inner line?

Viewed 32

Curren table looks like:

enter image description here

And table code is:

[('ALIGN', (0, 0), (-1, -1), 'CENTER'),
('ALIGN', (1, 1), (-1, -1), 'LEFT'),
('INNERGRID', (0, 0), (-1, -1), 0.25, colors.lightgrey),
# ('INNERGRID', (?, ?), (-1, -1), 0.25, colors.black), # I think maybe should modify this line
('LINEBELOW', (0, 0), (-1, 0), 1, colors.black),
('OUTLINE', (0, 0), (-1, -1), 1, colors.lightgrey),
('LEFTPADDING', (0, 0), (-1, -1), 1),
('RIGHTPADDING', (0, 0), (-1, -1), 1),
('TOPPADDING', (0, 0), (-1, -1), 1),
('BOTTOMPADDING', (0, 0), (-1, -1), 1),
]

But I want modify this code to make my table like:

enter image description here

If the variable 'lineBold' value is 2, a bold line is displayed every two lines in the table. Variable values can change.

Can I ask for advice to solve my problem?

0 Answers
Related