SlideShare a Scribd company logo
1 of 8
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 (20)

Java Programming
Java ProgrammingJava Programming
Java Programming
 
What is component in reactjs
What is component in reactjsWhat is component in reactjs
What is component in reactjs
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
for loop in java
for loop in java for loop in java
for loop in java
 
Javascript functions
Javascript functionsJavascript functions
Javascript functions
 
Functions in javascript
Functions in javascriptFunctions in javascript
Functions in javascript
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
Java threads
Java threadsJava threads
Java threads
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Packages in java
Packages in javaPackages in java
Packages in java
 
react redux.pdf
react redux.pdfreact redux.pdf
react redux.pdf
 
Javascript
JavascriptJavascript
Javascript
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
Dart programming language
Dart programming languageDart programming language
Dart programming language
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Java packages
Java packagesJava packages
Java packages
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 

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 212Mahmoud 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 181Mahmoud 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 185Mahmoud 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 pythonKarin Lagesen
 
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 181Mahmoud Samir Fayed
 
File handling in pythan.pptx
File handling in pythan.pptxFile handling in pythan.pptx
File handling in pythan.pptxNawalKishore38
 
Apache ant
Apache antApache ant
Apache antkoniik
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programmingNimrita 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.pdfRamziFeghali
 
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 PyEric ShangKuan
 

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 liberaryRohit malav
 
Presentation by purshotam verma
Presentation by purshotam vermaPresentation by purshotam verma
Presentation by purshotam vermaRohit 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 vermaRohit 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 malavRohit 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 malavRohit 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 malavRohit 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 malavRohit 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 malavRohit 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 MALAVRohit 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 2Rohit malav
 
ONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEMONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEMRohit malav
 
digital unlock power point slide
digital unlock power point slidedigital unlock power point slide
digital unlock power point slideRohit 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 viharRohit malav
 
Snake report ROHIT MALAV
Snake report ROHIT MALAVSnake report ROHIT MALAV
Snake report ROHIT MALAVRohit 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

Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 

Recently uploaded (20)

Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 

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.