Package cssutils :: Module serialize :: Class Out
[hide private]
[frames] | no frames]

Class Out

source code

object --+
         |
        Out

a simple class which makes appended items available as a combined string
Instance Methods [hide private]
 
__init__(self, ser)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_remove_last_if_S(self) source code
 
append(self, val, typ=None, space=True, keepS=False, indent=False, lineSeparator=False)
Appends val.
source code
 
value(self, delim=u'', end=None)
returns all items joined by delim
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ser)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

append(self, val, typ=None, space=True, keepS=False, indent=False, lineSeparator=False)

source code 

Appends val. Adds a single S after each token except as follows:

  • typ COMMENT

    uses cssText depending on self.ser.prefs.keepComments

  • typ "Property", cssutils.css.CSSRule.UNKNOWN_RULE

    uses cssText

  • typ STRING

    escapes ser._string

  • typ S

    ignored except keepS=True

  • typ URI

    calls ser_uri

  • val {

    adds LF after

  • val ;

    removes S before and adds LF after

  • val , :

    removes S before

  • val + > ~

    encloses in prefs.selectorCombinatorSpacer

  • some other vals

    add *spacer except space=False