#NEWLINE# def word_count( self ) : #NEWLINE# #INDENT# '\n        Display count of total words and selected words in a dialog box.\n        ' #NEWLINE# sel = self . get_selected_text ( ) #NEWLINE# slen = len ( sel . split ( ) ) #NEWLINE# txt = self . get_text ( ) #NEWLINE# tlen = len ( txt . split ( ) ) #NEWLINE# self . show_info ( 'Word Count' , ( '%d words in total\n%d words in selection' % ( tlen , slen ) ) )