Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
use a webservice to determine if the argument is valid css

        def validate_css(css):
    """use a webservice to determine if the argument is valid css"""
    url = 'http://jigsaw.w3.org/css-validator/validator?text=%s'
    url = url % urllib.quote_plus(css)
    foo = urllib2.urlopen(url)
    text = foo.read()
    return not 'We found the following errors' in text # XXX hacky
        


src/b/i/bitsyblog-2.4.5/bitsyblog/settings.py   bitsyblog(Download)
        css = value.file.read()
        try:
            validcss = utils.validate_css(css)
        except urllib2.URLError:
            raise InvalidSettingError('Could not validate CSS (sorry!)')