(self, todo, text_coming)
| 220 | self.text_box.insert(tk.INSERT, self.real_text, tk.END) |
| 221 | |
| 222 | def backend_work(self, todo, text_coming): |
| 223 | text_to_return = "" |
| 224 | if todo == "Encrypt": |
| 225 | try: |
| 226 | text_coming = str( |
| 227 | text_coming |
| 228 | ) # <----- Lowering the letters as dic in lower letter |
| 229 | for word in text_coming: |
| 230 | for key, value in self.data_dic.items(): |
| 231 | if word == key: |
| 232 | # print(word, " : ", key) |
| 233 | text_to_return += value |
| 234 | |
| 235 | except ValueError: |
| 236 | showerror("Unknown", "Something Went Wrong, Please Restart Application") |
| 237 | |
| 238 | return text_to_return |
| 239 | elif todo == "Decrypt": |
| 240 | try: |
| 241 | text_coming = str(text_coming) |
| 242 | for word in text_coming: |
| 243 | for key, value in self.data_dic.items(): |
| 244 | if word == value: |
| 245 | text_to_return += key |
| 246 | |
| 247 | except ValueError: |
| 248 | showerror("Unknown", "Something Went Wrong, Please Restart Application") |
| 249 | |
| 250 | return text_to_return |
| 251 | |
| 252 | else: |
| 253 | showerror("No Function", "Function Could not get what to do...!") |
| 254 | |
| 255 | |
| 256 | # ============================================================= |
no outgoing calls
no test coverage detected