def process_file(source): sheet = css_single.parse(source) hash = hashlib.md5() hash.update(sheet) filename = OUT_PREFIX + hash.hexdigest() + FILENAME_POSTFIX with open(filename, "w") as out: out.write(sheet) return source, filename
import css_single print css_single.parse('tests/css.css')