Our text editor will be able to open and save files (obviously). What our text editor does that other examples often don’t is it will ask us to save our changes (if there are any) before creating new file, opening another file or closing the program. We will be writing it in python 3 and tkinter.You can extend it yourself to extend its features.
#!/usr/bin/env python3# -*- coding: utf-8 -*-from tkinter import Tk, Text, Scrollbar, Menu, messagebox, filedialog, BooleanVar, Checkbutton, Label, Entry, StringVar, Grid, Frame import os, subprocess, json, string classEditor(): def__init__(self, root): self.root = root self.TITLE = "Subedi Editor" self.file_path = None self.set_title() frame = Frame(root) self.yscrollbar = Scrollbar(frame, orient="vertical"
View original post 610 more words