Write the collected set of CSS chunks to path.
(self, path, css=None)
| 427 | self.comment('Cannot find CSS file "%s"' % path) |
| 428 | |
| 429 | def writeCss(self, path, css=None): |
| 430 | """Write the collected set of CSS chunks to path.""" |
| 431 | try: |
| 432 | if css is None: |
| 433 | css = self.getCss() |
| 434 | f = codecs.open(path, 'w', 'utf-8') |
| 435 | f.write(css) |
| 436 | f.close() |
| 437 | except IOError: |
| 438 | print('[HtmlBuilder.writeCss] Cannot write CSS file "%s"' % path) |
| 439 | |
| 440 | def headerCss(self, name): |
| 441 | """Add the CSS code to the header of the output page. |