def write_plain(self, text, attr=None):
        u'''write text at current cursor position.'''
        text = ensure_unicode(text)
        log(u'write("%s", %s)' %(text, attr))
        if attr is None:
            attr = self.attr
        junk = DWORD(0)
        self.SetConsoleTextAttribute(self.hout, attr)
        for short_chunk in split_block(chunk):
            self.WriteConsoleW(self.hout, ensure_unicode(short_chunk), 
                               len(short_chunk), byref(junk), None)
        return len(text)
def write_plain ( self , text , attr = None ) : text = ensure_unicode ( text ) log ( u'write("%s", %s)' % ( text , attr ) ) if attr is None : attr = self . attr junk = DWORD ( 0 ) self . SetConsoleTextAttribute ( self . hout , attr ) for short_chunk in split_block ( chunk ) : self . WriteConsoleW ( self . hout , ensure_unicode ( short_chunk ) , len ( short_chunk ) , byref ( junk ) , None ) return len ( text )
u'''write text at current cursor position.