#### Translation functions #### def trans_ROT13(self,e): table = string.maketrans( 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') print table text_content = self.control.GetValue() # get the text buffer text_content.translate(table) self.control.SetValue(text_content)