Build Your Own Notepad With Python
In this tutorial, i will explain you how to create your own Notepad using python and for making this Notepad projects i am using very simple python coding( Only using tkinter module for this project ).
Source Code :-
****************************************************************************
from tkinter import *
from tkinter.filedialog import *
win = Tk()
win.geometry('400x570')
win.title('Notepad')
def openfile():
file = askopenfile(mode='r',filetypes=[('filename','*.txt')])
if file is not None:
content = file.read()
text.insert(INSERT,content)
def savefile():
new_file = asksaveasfile(mode='w',filetypes=[('filename','.txt')])
if new_file is None:
return
text1 = text.get(1.0,END)
new_file.write(text1)
new_file.close()
def clearfile():
text.delete(1.0,END)
text = Text(win,font='impack 15 bold',bg='yellow',wrap=WORD)
text.pack(padx=10,pady=40)
Button(win,text='Open',font='poppins 15 bold',bg='blue',fg='white',bd=0,cursor='hand2',command=openfile).place(x=50,y=530)
Button(win,text='Save',font='poppins 15 bold',bg='green',fg='white',bd=0,cursor='hand2',command=savefile).place(x=130,y=530)
Button(win,text='Clear',font='poppins 15 bold',bg='purple',fg='white',bd=0,cursor='hand2',command=clearfile).place(x=210,y=530)
Button(win,text='Exit',font='poppins 15 bold',bg='red',fg='white',bd=0,cursor='hand2',command=lambda :exit()).place(x=290,y=530)
mainloop()
****************************************************************************
#python
#notepad
#pythonprojects
#pythonforbeginners
#pythoninhindi
#learnpython
#pythonprojectsforresume
#pythonprogramming
#pythonstation
#createnotepadwithpython
#pythonprojectsinhindi
Auf dieser Seite können Sie das Online-Video Build Your Own Notepad With Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Python Station 28 Juli 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 402 Mal angesehen und es wurde von 26 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!