filmov
tv
Build Your Own Notepad With Python

Показать описание
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 *
win = Tk()
def openfile():
file = askopenfile(mode='r',filetypes=[('filename','*.txt')])
if file is not None:
def savefile():
new_file = asksaveasfile(mode='w',filetypes=[('filename','.txt')])
if new_file is None:
return
def clearfile():
text = Text(win,font='impack 15 bold',bg='yellow',wrap=WORD)
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
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 *
win = Tk()
def openfile():
file = askopenfile(mode='r',filetypes=[('filename','*.txt')])
if file is not None:
def savefile():
new_file = asksaveasfile(mode='w',filetypes=[('filename','.txt')])
if new_file is None:
return
def clearfile():
text = Text(win,font='impack 15 bold',bg='yellow',wrap=WORD)
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