SlideShare a Scribd company logo
SUBMITTED BY:- ROHIT MALAV SUBMITTED TO:- MR.GAJANAND SIR
MAKING NOTEDPAD IN PAYTHON
OBJECTIVE:-
The thoughtfully designed software, making notepad using frame
system is meant for computer working in organisations. The
software is integrated with the data in the computer
organisation.
KEY HIGHLIGHTS
The barebone text editor
So here’s the starting code for a text editor:
import Tkinter import ScrolledText # Because Tkinter
textarea does not provide scrolling # abilities, we use
this additional library root = Tkinter.Tk(className="
Just another Text Editor") textPad =
ScrolledText.ScrolledText(root, width=100, height=80)
textPad.pack() root.mainloop()
Adding Menu Items
import Tkinter from Tkinter import Menu import ScrolledText root =
Tkinter.Tk(className="Just another Text Editor") textPad =
ScrolledText.ScrolledText(root, width=100, height=80) # creates
text area # create a menu def dummy(): print "I am a Dummy
Command, I will be removed in the next step" menu = Menu(root)
root.config(menu=menu) filemenu = Menu(menu)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="New", command=dummy)
filemenu.add_command(label="Open...", command=dummy)
filemenu.add_command(label="Save", command=dummy)
filemenu.add_separator() filemenu.add_command(label="Exit",
command=dummy) helpmenu = Menu(menu)
menu.add_cascade(label="Help", menu=helpmenu)
helpmenu.add_command(label="About...", command=dummy) #
end of menu creation textPad.pack() root.mainloop()
ADDING FUNCTIONALITY TO EACH MENU ITEM
import Tkinter from Tkinter import * from ScrolledText import *
import tkFileDialog import tkMessageBox root =
Tkinter.Tk(className=" Just another Text Editor") textPad =
ScrolledText(root, width=100, height=80) # create a menu &
define functions for each menu item def open_command():
file =
tkFileDialog.askopenfile(parent=root,mode='rb',title='Select
a file') if file != None: contents = file.read()
textPad.insert('1.0',contents) file.close() def
save_command(self): file =
tkFileDialog.asksaveasfile(mode='w') if file != None: # slice off
the last character from get, as an extra return is added
contents = file.read()
textPad.insert('1.0',contents) file.close() def
save_command(self): file =
tkFileDialog.asksaveasfile(mode='w') if file !=
None: # slice off the last character from get,
as an extra return is added data =
self.textPad.get('1.0', END+'-1c')
file.write(data) file.close() def
exit_command(): if
tkMessageBox.askokcancel("Quit", "Do you
really want to quit?"): root.destroy() def
about_command(): label =
tkMessageBox.showinfo("About", "Just
Another TextPad n Copyright n No rights
left to reserve")
def dummy(): print "I am a Dummy Command, I will be removed in the
next step" menu = Menu(root) root.config(menu=menu) filemenu =
Menu(menu) menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="New", command=dummy)
filemenu.add_command(label="Open...",
command=open_command) filemenu.add_command(label="Save",
command=save_command) filemenu.add_separator()
filemenu.add_command(label="Exit", command=exit_command)
helpmenu = Menu(menu) menu.add_cascade(label="Help",
menu=helpmenu) helpmenu.add_command(label="About...",
command=about_command) # textPad.pack() root.mainloop()
That gives us a simple Text Editor designed in Python & Tkinter with the
basic functionalities.
If you play with this code and add more functionalities, do let me know
in the comment section.
NOTEPAD  MAKING IN PAYTHON BY ROHIT MALAV

More Related Content

What's hot

Tkinter_GUI_Programming_in_Python.pdf
Tkinter_GUI_Programming_in_Python.pdfTkinter_GUI_Programming_in_Python.pdf
Tkinter_GUI_Programming_in_Python.pdf
ArielManzano3
 
Python programming : Strings
Python programming : StringsPython programming : Strings
Python programming : Strings
Emertxe Information Technologies Pvt Ltd
 
Python - gui programming (tkinter)
Python - gui programming (tkinter)Python - gui programming (tkinter)
Python - gui programming (tkinter)
Learnbay Datascience
 
Basics of Model/View Qt programming
Basics of Model/View Qt programmingBasics of Model/View Qt programming
Basics of Model/View Qt programming
ICS
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
yht4ever
 
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Edureka!
 
List in Python
List in PythonList in Python
List in Python
Siddique Ibrahim
 
Academic writing in LaTeX
Academic writing in LaTeX Academic writing in LaTeX
Academic writing in LaTeX
Daniele Di Mitri
 
javathreads
javathreadsjavathreads
javathreads
Arjun Shanka
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
JavaScript Control Statements I
JavaScript Control Statements IJavaScript Control Statements I
JavaScript Control Statements I
Reem Alattas
 
Adv. python regular expression by Rj
Adv. python regular expression by RjAdv. python regular expression by Rj
Adv. python regular expression by Rj
Shree M.L.Kakadiya MCA mahila college, Amreli
 
Applets in java
Applets in javaApplets in java
Applets in java
Wani Zahoor
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
shanmuga rajan
 
PYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.pptPYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.ppt
PriyaSoundararajan1
 
4.C#
4.C#4.C#
Introduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah NabatiIntroduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah Nabati
nabati
 
Unit 5 java-awt (1)
Unit 5 java-awt (1)Unit 5 java-awt (1)
Unit 5 java-awt (1)
DevaKumari Vijay
 
Python Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime modulePython Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime module
P3 InfoTech Solutions Pvt. Ltd.
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
JayjZens
 

What's hot (20)

Tkinter_GUI_Programming_in_Python.pdf
Tkinter_GUI_Programming_in_Python.pdfTkinter_GUI_Programming_in_Python.pdf
Tkinter_GUI_Programming_in_Python.pdf
 
Python programming : Strings
Python programming : StringsPython programming : Strings
Python programming : Strings
 
Python - gui programming (tkinter)
Python - gui programming (tkinter)Python - gui programming (tkinter)
Python - gui programming (tkinter)
 
Basics of Model/View Qt programming
Basics of Model/View Qt programmingBasics of Model/View Qt programming
Basics of Model/View Qt programming
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
 
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
 
List in Python
List in PythonList in Python
List in Python
 
Academic writing in LaTeX
Academic writing in LaTeX Academic writing in LaTeX
Academic writing in LaTeX
 
javathreads
javathreadsjavathreads
javathreads
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil
 
JavaScript Control Statements I
JavaScript Control Statements IJavaScript Control Statements I
JavaScript Control Statements I
 
Adv. python regular expression by Rj
Adv. python regular expression by RjAdv. python regular expression by Rj
Adv. python regular expression by Rj
 
Applets in java
Applets in javaApplets in java
Applets in java
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
PYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.pptPYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.ppt
 
4.C#
4.C#4.C#
4.C#
 
Introduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah NabatiIntroduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah Nabati
 
Unit 5 java-awt (1)
Unit 5 java-awt (1)Unit 5 java-awt (1)
Unit 5 java-awt (1)
 
Python Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime modulePython Programming Essentials - M23 - datetime module
Python Programming Essentials - M23 - datetime module
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
 

Similar to NOTEPAD MAKING IN PAYTHON BY ROHIT MALAV

8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
Yashpatel821746
 
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Yashpatel821746
 
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
Yashpatel821746
 
The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185
Mahmoud Samir Fayed
 
Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Dr. Volkan OBAN
 
Functions and modules in python
Functions and modules in pythonFunctions and modules in python
Functions and modules in python
Karin Lagesen
 
Built in function
Built in functionBuilt in function
Built in function
MD. Rayhanul Islam Sayket
 
The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181
Mahmoud Samir Fayed
 
Celery with python
Celery with pythonCelery with python
Celery with python
Alexandre González Rodríguez
 
File handling in pythan.pptx
File handling in pythan.pptxFile handling in pythan.pptx
File handling in pythan.pptx
NawalKishore38
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
Dr. Volkan OBAN
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
Dieudonne Nahigombeye
 
Apache ant
Apache antApache ant
Apache ant
koniik
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
Siarzh Miadzvedzeu
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
Nimrita Koul
 
Pres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdfPres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdf
RamziFeghali
 
Practical Google App Engine Applications In Py
Practical Google App Engine Applications In PyPractical Google App Engine Applications In Py
Practical Google App Engine Applications In Py
Eric ShangKuan
 
My First Ruby
My First RubyMy First Ruby
My First Ruby
Murray Steele
 

Similar to NOTEPAD MAKING IN PAYTHON BY ROHIT MALAV (20)

8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
 
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
 
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
 
The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212
 
The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181
 
The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185
 
Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...
 
Functions and modules in python
Functions and modules in pythonFunctions and modules in python
Functions and modules in python
 
Built in function
Built in functionBuilt in function
Built in function
 
The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181
 
Celery with python
Celery with pythonCelery with python
Celery with python
 
File handling in pythan.pptx
File handling in pythan.pptxFile handling in pythan.pptx
File handling in pythan.pptx
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
 
Apache ant
Apache antApache ant
Apache ant
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
 
Pres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdfPres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdf
 
Practical Google App Engine Applications In Py
Practical Google App Engine Applications In PyPractical Google App Engine Applications In Py
Practical Google App Engine Applications In Py
 
My First Ruby
My First RubyMy First Ruby
My First Ruby
 

More from Rohit malav

Aca lab project (rohit malav)
Aca lab project (rohit malav) Aca lab project (rohit malav)
Aca lab project (rohit malav)
Rohit malav
 
operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)
Rohit malav
 
Python pandas liberary
Python pandas liberaryPython pandas liberary
Python pandas liberary
Rohit malav
 
Presentation by purshotam verma
Presentation by purshotam vermaPresentation by purshotam verma
Presentation by purshotam verma
Rohit malav
 
Deep learning in python by purshottam verma
Deep learning in python by purshottam vermaDeep learning in python by purshottam verma
Deep learning in python by purshottam verma
Rohit malav
 
Atm Security System Using Steganography Nss ptt by (rohit malav)
Atm Security System Using  Steganography Nss ptt by (rohit malav)Atm Security System Using  Steganography Nss ptt by (rohit malav)
Atm Security System Using Steganography Nss ptt by (rohit malav)
Rohit malav
 
Samba server Pts report pdf by Rohit malav
Samba server Pts report pdf by Rohit malavSamba server Pts report pdf by Rohit malav
Samba server Pts report pdf by Rohit malav
Rohit malav
 
System calls operating system ppt by rohit malav
System calls operating system  ppt by rohit malavSystem calls operating system  ppt by rohit malav
System calls operating system ppt by rohit malav
Rohit malav
 
A project on spring framework by rohit malav
A project on spring framework by rohit malavA project on spring framework by rohit malav
A project on spring framework by rohit malav
Rohit malav
 
android text encryption Network security lab by rohit malav
android text encryption Network security lab by rohit malavandroid text encryption Network security lab by rohit malav
android text encryption Network security lab by rohit malav
Rohit malav
 
samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)
Rohit malav
 
Spring frame work by rohit malav(detailed)
Spring frame work by rohit malav(detailed)Spring frame work by rohit malav(detailed)
Spring frame work by rohit malav(detailed)
Rohit malav
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malav
Rohit malav
 
Samba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAVSamba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAV
Rohit malav
 
Payroll system ppt1 (rohit malav)
Payroll system ppt1 (rohit malav)Payroll system ppt1 (rohit malav)
Payroll system ppt1 (rohit malav)
Rohit malav
 
Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2
Rohit malav
 
ONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEMONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEM
Rohit malav
 
digital unlock power point slide
digital unlock power point slidedigital unlock power point slide
digital unlock power point slide
Rohit malav
 
Rohit android lab projects in suresh gyan vihar
Rohit android lab projects in suresh gyan viharRohit android lab projects in suresh gyan vihar
Rohit android lab projects in suresh gyan vihar
Rohit malav
 
Snake report ROHIT MALAV
Snake report ROHIT MALAVSnake report ROHIT MALAV
Snake report ROHIT MALAV
Rohit malav
 

More from Rohit malav (20)

Aca lab project (rohit malav)
Aca lab project (rohit malav) Aca lab project (rohit malav)
Aca lab project (rohit malav)
 
operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)
 
Python pandas liberary
Python pandas liberaryPython pandas liberary
Python pandas liberary
 
Presentation by purshotam verma
Presentation by purshotam vermaPresentation by purshotam verma
Presentation by purshotam verma
 
Deep learning in python by purshottam verma
Deep learning in python by purshottam vermaDeep learning in python by purshottam verma
Deep learning in python by purshottam verma
 
Atm Security System Using Steganography Nss ptt by (rohit malav)
Atm Security System Using  Steganography Nss ptt by (rohit malav)Atm Security System Using  Steganography Nss ptt by (rohit malav)
Atm Security System Using Steganography Nss ptt by (rohit malav)
 
Samba server Pts report pdf by Rohit malav
Samba server Pts report pdf by Rohit malavSamba server Pts report pdf by Rohit malav
Samba server Pts report pdf by Rohit malav
 
System calls operating system ppt by rohit malav
System calls operating system  ppt by rohit malavSystem calls operating system  ppt by rohit malav
System calls operating system ppt by rohit malav
 
A project on spring framework by rohit malav
A project on spring framework by rohit malavA project on spring framework by rohit malav
A project on spring framework by rohit malav
 
android text encryption Network security lab by rohit malav
android text encryption Network security lab by rohit malavandroid text encryption Network security lab by rohit malav
android text encryption Network security lab by rohit malav
 
samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)
 
Spring frame work by rohit malav(detailed)
Spring frame work by rohit malav(detailed)Spring frame work by rohit malav(detailed)
Spring frame work by rohit malav(detailed)
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malav
 
Samba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAVSamba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAV
 
Payroll system ppt1 (rohit malav)
Payroll system ppt1 (rohit malav)Payroll system ppt1 (rohit malav)
Payroll system ppt1 (rohit malav)
 
Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2
 
ONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEMONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEM
 
digital unlock power point slide
digital unlock power point slidedigital unlock power point slide
digital unlock power point slide
 
Rohit android lab projects in suresh gyan vihar
Rohit android lab projects in suresh gyan viharRohit android lab projects in suresh gyan vihar
Rohit android lab projects in suresh gyan vihar
 
Snake report ROHIT MALAV
Snake report ROHIT MALAVSnake report ROHIT MALAV
Snake report ROHIT MALAV
 

Recently uploaded

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
ravindarpurohit26
 

Recently uploaded (20)

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
 

NOTEPAD MAKING IN PAYTHON BY ROHIT MALAV

  • 1. SUBMITTED BY:- ROHIT MALAV SUBMITTED TO:- MR.GAJANAND SIR MAKING NOTEDPAD IN PAYTHON
  • 2. OBJECTIVE:- The thoughtfully designed software, making notepad using frame system is meant for computer working in organisations. The software is integrated with the data in the computer organisation.
  • 3. KEY HIGHLIGHTS The barebone text editor So here’s the starting code for a text editor: import Tkinter import ScrolledText # Because Tkinter textarea does not provide scrolling # abilities, we use this additional library root = Tkinter.Tk(className=" Just another Text Editor") textPad = ScrolledText.ScrolledText(root, width=100, height=80) textPad.pack() root.mainloop()
  • 4. Adding Menu Items import Tkinter from Tkinter import Menu import ScrolledText root = Tkinter.Tk(className="Just another Text Editor") textPad = ScrolledText.ScrolledText(root, width=100, height=80) # creates text area # create a menu def dummy(): print "I am a Dummy Command, I will be removed in the next step" menu = Menu(root) root.config(menu=menu) filemenu = Menu(menu) menu.add_cascade(label="File", menu=filemenu) filemenu.add_command(label="New", command=dummy) filemenu.add_command(label="Open...", command=dummy) filemenu.add_command(label="Save", command=dummy) filemenu.add_separator() filemenu.add_command(label="Exit", command=dummy) helpmenu = Menu(menu) menu.add_cascade(label="Help", menu=helpmenu) helpmenu.add_command(label="About...", command=dummy) # end of menu creation textPad.pack() root.mainloop()
  • 5. ADDING FUNCTIONALITY TO EACH MENU ITEM import Tkinter from Tkinter import * from ScrolledText import * import tkFileDialog import tkMessageBox root = Tkinter.Tk(className=" Just another Text Editor") textPad = ScrolledText(root, width=100, height=80) # create a menu & define functions for each menu item def open_command(): file = tkFileDialog.askopenfile(parent=root,mode='rb',title='Select a file') if file != None: contents = file.read() textPad.insert('1.0',contents) file.close() def save_command(self): file = tkFileDialog.asksaveasfile(mode='w') if file != None: # slice off the last character from get, as an extra return is added
  • 6. contents = file.read() textPad.insert('1.0',contents) file.close() def save_command(self): file = tkFileDialog.asksaveasfile(mode='w') if file != None: # slice off the last character from get, as an extra return is added data = self.textPad.get('1.0', END+'-1c') file.write(data) file.close() def exit_command(): if tkMessageBox.askokcancel("Quit", "Do you really want to quit?"): root.destroy() def about_command(): label = tkMessageBox.showinfo("About", "Just Another TextPad n Copyright n No rights left to reserve")
  • 7. def dummy(): print "I am a Dummy Command, I will be removed in the next step" menu = Menu(root) root.config(menu=menu) filemenu = Menu(menu) menu.add_cascade(label="File", menu=filemenu) filemenu.add_command(label="New", command=dummy) filemenu.add_command(label="Open...", command=open_command) filemenu.add_command(label="Save", command=save_command) filemenu.add_separator() filemenu.add_command(label="Exit", command=exit_command) helpmenu = Menu(menu) menu.add_cascade(label="Help", menu=helpmenu) helpmenu.add_command(label="About...", command=about_command) # textPad.pack() root.mainloop() That gives us a simple Text Editor designed in Python & Tkinter with the basic functionalities. If you play with this code and add more functionalities, do let me know in the comment section.