File: codec.py

package info (click to toggle)
cssutils 2.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,312 kB
  • sloc: python: 23,625; javascript: 803; sh: 62; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 331 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import codecs
import pathlib

import cssutils

__here__ = pathlib.Path(__file__).parent


def main():
    cases = __here__.parent / 'sheets' / 'cases.css'
    cssText = codecs.open(cases, encoding='css').read()
    sheet = cssutils.parseString(cssText)
    print(sheet)
    print(sheet.cssText)


__name__ == '__main__' and main()