def setSyntax(self, syntax):
        """Choose smart indentation algorithm according to syntax"""
        self._smartIndenter = self._chooseSmartIndenter(syntax)
def chunkstring(s, n):
    return [ s[i:i+n] for i in xrange(0, len(s), n) ]