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

PPTX
Python/Flask Presentation
PPT
Python GUI Programming
PPTX
Introduction to Python for Data Science and Machine Learning
PDF
Effective Modern C++ 勉強会#3 Item 15
PPTX
The Difference Between TypeScript V/S JavaScript
PPTX
Data Structures in Python
PPT
PYTHON - TKINTER - GUI - PART 1.ppt
Python/Flask Presentation
Python GUI Programming
Introduction to Python for Data Science and Machine Learning
Effective Modern C++ 勉強会#3 Item 15
The Difference Between TypeScript V/S JavaScript
Data Structures in Python
PYTHON - TKINTER - GUI - PART 1.ppt

What's hot (20)

DOC
CS8391 Data Structures Part B Questions Anna University
PPT
Linked lists
PPT
Data structures using c
PPTX
Functions in python slide share
PPTX
Tuple in python
PPTX
Python Data Structures and Algorithms.pptx
PPTX
Constructors & destructors
PPTX
Introduction to pandas
PPTX
sorting and its types
PPTX
FLOW OF CONTROL-INTRO PYTHON
PPTX
Class 12 CS Ch-16 MySQL PPT.pptx
PPTX
Recursion in Data Structure
PDF
Python If Else | If Else Statement In Python | Edureka
PPTX
Python Tutorial Part 1
PPTX
Constructor overloading in C++
PDF
20160331_Automate the boring stuff with python
PDF
Python for class 11 (CBSE Computer science sub code 083)
PPTX
Introduction to Django
PDF
Zero to Hero - Introduction to Python3
PDF
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
CS8391 Data Structures Part B Questions Anna University
Linked lists
Data structures using c
Functions in python slide share
Tuple in python
Python Data Structures and Algorithms.pptx
Constructors & destructors
Introduction to pandas
sorting and its types
FLOW OF CONTROL-INTRO PYTHON
Class 12 CS Ch-16 MySQL PPT.pptx
Recursion in Data Structure
Python If Else | If Else Statement In Python | Edureka
Python Tutorial Part 1
Constructor overloading in C++
20160331_Automate the boring stuff with python
Python for class 11 (CBSE Computer science sub code 083)
Introduction to Django
Zero to Hero - Introduction to Python3
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Ad

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

PPTX
tkinterpptxguipythonImport it is named ‘tkinter
PPTX
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYA
PPTX
Day 18.pptx
DOCX
File Handling in python.docx
PDF
Class 7b: Files & File I/O
PPTX
Tkinter_GUI_Programming_in_Pythovvn.pptx
PDF
Python Menu
PDF
Python programming : Files
PPTX
Python ppt
PPTX
Python UNIT-III-part-1.pptx File Handling
PDF
The Ring programming language version 1.8 book - Part 75 of 202
PDF
The Ring programming language version 1.7 book - Part 73 of 196
PDF
The Ring programming language version 1.5.1 book - Part 64 of 180
PDF
Tkinter_GUI_Programming_in_ Python.pdf
PDF
Tkinter_GUI_Programming_in_Python.pdf
PPTX
Python IO
PPT
tkinter final ppt.ppt
PDF
A Complete seminar on GUI Development in python
PPT
Python Programming
tkinterpptxguipythonImport it is named ‘tkinter
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYA
Day 18.pptx
File Handling in python.docx
Class 7b: Files & File I/O
Tkinter_GUI_Programming_in_Pythovvn.pptx
Python Menu
Python programming : Files
Python ppt
Python UNIT-III-part-1.pptx File Handling
The Ring programming language version 1.8 book - Part 75 of 202
The Ring programming language version 1.7 book - Part 73 of 196
The Ring programming language version 1.5.1 book - Part 64 of 180
Tkinter_GUI_Programming_in_ Python.pdf
Tkinter_GUI_Programming_in_Python.pdf
Python IO
tkinter final ppt.ppt
A Complete seminar on GUI Development in python
Python Programming
Ad

More from Rohit malav (20)

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

Recently uploaded (20)

PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPT
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
737-MAX_SRG.pdf student reference guides
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PPTX
UNIT - 3 Total quality Management .pptx
PDF
Visual Aids for Exploratory Data Analysis.pdf
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
Soil Improvement Techniques Note - Rabbi
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPT
Total quality management ppt for engineering students
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PPTX
Fundamentals of Mechanical Engineering.pptx
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
III.4.1.2_The_Space_Environment.p pdffdf
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
737-MAX_SRG.pdf student reference guides
R24 SURVEYING LAB MANUAL for civil enggi
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
UNIT - 3 Total quality Management .pptx
Visual Aids for Exploratory Data Analysis.pdf
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Soil Improvement Techniques Note - Rabbi
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Total quality management ppt for engineering students
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Exploratory_Data_Analysis_Fundamentals.pdf
Fundamentals of Mechanical Engineering.pptx

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.