home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __all__ = [
- 'CSSComment']
- __docformat__ = 'restructuredtext'
- __version__ = '$Id: csscomment.py 1943 2010-03-23 20:54:00Z cthedot $'
- import cssrule
- import cssutils
- import xml.dom as xml
-
- class CSSComment(cssrule.CSSRule):
-
- def __init__(self, cssText = None, parentRule = None, parentStyleSheet = None, readonly = False):
- super(CSSComment, self).__init__(parentRule = parentRule, parentStyleSheet = parentStyleSheet)
- self._cssText = None
- if cssText:
- self._setCssText(cssText)
-
- self._readonly = readonly
-
-
- def __repr__(self):
- return 'cssutils.css.%s(cssText=%r)' % (self.__class__.__name__, self.cssText)
-
-
- def __str__(self):
- return '<cssutils.css.%s object cssText=%r at 0x%x>' % (self.__class__.__name__, self.cssText, id(self))
-
-
- def _getCssText(self):
- return cssutils.ser.do_CSSComment(self)
-
-
- def _setCssText(self, cssText):
- super(CSSComment, self)._setCssText(cssText)
- tokenizer = self._tokenize2(cssText)
- commenttoken = self._nexttoken(tokenizer)
- unexpected = self._nexttoken(tokenizer)
- if not commenttoken and self._type(commenttoken) != self._prods.COMMENT or unexpected:
- self._log.error(u'CSSComment: Not a CSSComment: %r' % self._valuestr(cssText), error = xml.dom.InvalidModificationErr)
- else:
- self._cssText = self._tokenvalue(commenttoken)
-
- cssText = property(_getCssText, _setCssText, doc = u'The parsable textual representation of this rule.')
- type = property((lambda self: self.COMMENT), doc = u'The type of this rule, as defined by a CSSRule type constant.')
- wellformed = property((lambda self: True))
-
-