Reply to comment

HTML.py - adding header_styles and td_styles parameters

Hallo,
I,ve needed to do some tables, so I used your modul HTML but changed it a bit. Now it's quite easy to make tables with various styles:

t = HTML.Table(header_row= ['č.b.', 'jméno', 'podíl', 'první vhodné datum', 'druhé vhodné datum', 'podpis'],
header_styles=('width: 3%', 'width: 25%', 'width: 5%', 'width: 12%', 'width: 12%', 'width: 15%' ),
td_styles= ('text-align: right', '', 'text-align: right', '', '', '' ))
for byt, podil, jmeno in naj:
t.rows.append([byt, jmeno, podil, '', ''])
htmlcode = str(t). Are you interested?

Kind regards Michal

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <b> <address> <blockquote> <br> <caption> <center> <code> <dd> <del> <div> <dl> <dt> <em> <font> <h2> <h3> <h4> <h5> <h6> <hr> <i> <img> <li> <ol> <p> <pre> <span> <strong> <sub> <sup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <u> <ul> <tr>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Use [toc list: ol; title: Table of Contents; minlevel: 2; maxlevel: 3; attachments: yes;] to insert a mediawiki style collapsible table of contents. All the arguments are optional.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.