Build Your Own Notepad With Python

Publicado em: 28 Julho 2022
no canal de: Python Station
402
26

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


Nesta página do site você pode assistir ao vídeo on-line Build Your Own Notepad With Python duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Python Station 28 Julho 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 402 vezes e gostou 26 espectadores. Boa visualização!