To run the file, enter the following command into a terminal
python3 EditorMul.py
Text.delete(1.0,END)
is used to clear the whole area.
askopenfilename
is used to select the file to be opened.
asksaveasfilename
is used to select the file in both instances of save.
Text.config
is used for switching between the themes.
askokcancel
is used to confirm from the user whether they want to exit the application and then destroy()
method is run to destroy the instance and close the application.
Tkinter events
select(1.0,END)
, cut, copy, paste are used for the Select All, Cut, Copy, Paste functions respectively.
def __find(self,event=None):
t1=threading.Thread(target=self.\__finder());
t1.start()
t1.join()
Multithreading has been implemented in find feature.
def __findNReplace(self,event=None):
t1=threading.Thread(target=self.__findNReplaceF())
t1.start()
t1.join()
Multithreading has been implemented to ensure that Find and Replace does not interfere with working of the editor.
Note: Spell Check function works only with .txt files.
def __SpellCheck(self,event = None):
t1=threading.Thread(target=self.__SpellChecker())
t1.start()
t1.join()
Multithreading has been implemented in the Spell Check function to work parallelly and not block the working of the editor itself.
messagebox.showinfo()
is used to show the list of available shortcuts to the user.
- Create a tabbed version to work on multiple files simultaneously.
- Implement undo, redo features.
- Implement font selection, size change and color change features.
- Implement the option to bold, italicize, underline, strikethrough text, etc.
GeeksforGeeks tutorial on Text Editors using Tkiner - Basic Template
Template for Find and Replace
Tkinter Tutorial