Home | Trees | Indices | Help |
|
---|
|
cssutils - CSS Cascading Style Sheets library for Python
Copyright (C) 2004-2008 Christof Hoeke
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
A Python package to parse and build CSS Cascading Style Sheets.
Based upon and partly implements the following specifications (DOM only, not any rendering facilities):
Please visit http://cthedot.de/cssutils/ for full details and updates.
Tested with Python 2.5 on Windows XP.
This library is optimized for usage of from cssutils import * which import subpackages css and stylesheets, CSSParser and CSSSerializer classes only.
Usage may be:
>>> from cssutils import * >>> parser = CSSParser() >>> sheet = parser.parseString(u'a { color: red}') >>> print sheet.cssText
Version: 0.9.5a1 $LastChangedRevision: 846 $
Date: $LastChangedDate: 2008-01-13 18:10:54 +0100 (So, 13 Jan 2008) $
Author: $LastChangedBy: cthedot $
|
|||
|
|
|||
CSSParser parses a CSS StyleSheet string or file and returns a DOM Level 2 CSS StyleSheet object |
|||
CSSSerializer Methods to serialize a CSSStylesheet and its parts |
|||
DOMImplementationCSS This interface allows the DOM user to create a CSSStyleSheet outside the context of a document. |
|
|||
|
|||
|
|||
|
|
|||
ser = CSSSerializer()
|
Imports: cssutils.codec, cssutils.cssproductions, cssutils.errorhandler, cssutils.serialize, cssutils.tokenize2, cssutils.util, xml
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Sun Jan 13 18:12:39 2008 | http://epydoc.sourceforge.net |