LengthFrom Enso Wiki
[edit] DescriptionI've been looking at an easy way to get the length of text for awhile and this just seemed to easy. This doesn't put the length anywhere just displays it, since normally I just want to know. [edit] Codefrom base import BaseCommand class Command(BaseCommand): def __init__(self, *args): BaseCommand.__init__(self, *args) self.newCommand("length", self._length, "Get Length of Selected Text", "Select Text and Run Length command to get length of text.") def _length(self, postfix): text = self.getUnicodeSelection() self.displayMessage(text, "%s" % len(text)) |

