Python Microproject
Python Microproject
TSSM’s
Bhivarabai Sawant College of Engineering and Research (Polytechnic),
Narhe
MICRO PROJECT
ON
1
MAHARASHTRA STATE
This is to certify that Mr :- Nitesh Gowardhan Borla, Roll No. 50 of VIth Semester of
completed the Micro Project satisfactorily in Subject: Programming With Python for the
Principal
2
GROUP DETAILS
Name of guide
Prof. Mali. S.L
INDEX
3
ABSTRACT
1
INTRODUCTION
2
3 PROJECT INFORMATION
CODE
3
OUTPUT/SCREENSHOT
4
CONCLUSION
5
6 REFERENCES
ANEEXURE II
8
4
1. ABSTRACT
As you must be already aware, Notepad is a simple text editor for Microsoft Windows that
allows users to create text documents, save them as plain text, and edit plaintext files. It is
extremely useful for viewing or writing relatively short text documents saved as plain text.
Python feature such as Tkinter + database(sqlite3) etc. We have used visual code platform to
develop the text editor. There are several kinds of functions available in my text editor like
we can make our text bold, italic, normal and colourful. We have developed a real software
which canper form all the basic task similar to MS Word. We have used several kinds of
icons for better navigation, which is very-very useful for the user. This texteditor is helpful
for beginners who want to learn the typing. It is very-very friendly for the new users.
Tkinter interface used for Text editor. Basic tasks like cursor, line number File handling to
manage the text files. Different icons for cut, copy, info, find_ text, new file, open file. Line
numbers and column number display at the bottom. To open and save files, the project is
using Python file handling system and its basic method. The text editor offers functionalities
like open, close, edit and create new files using Python. Texteditor is an application like
notepad to write documents and other files.
2. INTRODUSTION
5
Text editors are essential tools for programmers and developers to write, edit and debug code
efficiently. While there are many popular text editors available, building your own can
provide valuable learning opportunities and the ability to customize the editor to suit your
specific needs. In this project, we will develop a simple text editor using Python. Python is a
powerful and widely-used programming language that offers many useful libraries and tools
for building software applications.
Our text editor will include features such as syntax highlighting, auto-indentation, search and
replace, and file saving and loading capabilities. We will use the Tkinter library, which is a
built-in Python library for creating GUI applications, to develop the graphical interface of our
text editor. Additionally, we will explore other libraries such as Pygments, which is a syntax
highlighting library, to enhance the functionality of our editor.
3. PROJECT INFORMATION
6
Objective: To develop a simple text editor using Python with features such as syntax
highlighting, auto-indentation, search and replace, and file saving and loading capabilities.
Tools/Libraries:
Python 3.x
Functionality:
GUI interface with a menu bar and toolbar for various functions such as opening, saving, and
editing files.
Support for various file types including plain text, Python, HTML, CSS, and JavaScript.
Features:
Customizable font and color settings for text and syntax highlighting.
4. CODE
7
from tkinter import messagebox self.statusbar =
Label(self.root,textvariable=self.status,font
from tkinter import filedialog =("times new
# Defining TextEditor Class roman",15,"bold"),bd=2,relief=GROOVE)
# Defining Constructor
self.statusbar.pack(side=BOTTOM,fill=B
def _init_(self,root): OTH)
self.titlebar =
self.filemenu.add_command(label="New",
Label(self.root,textvariable=self.title,font=
accelerator="Ctrl+N",command=self.newf
("times new
ile)
roman",15,"bold"),bd=2,relief=GROOVE)
# Adding Open file Command
# Packing Titlebar to root window
self.titlebar.pack(side=TOP,fill=BOTH)
self.filemenu.add_command(label="Open"
# Calling Settitle Function ,accelerator="Ctrl+O",command=self.open
file)
self.settitle()
# Adding Save File Command
# Creating Statusbar
8
self.filemenu.add_command(label="Save", self.editmenu.add_command(label="Paste
accelerator="Ctrl+S",command=self.savefi ",accelerator="Ctrl+V",command=self.pas
le) te)
self.editmenu.add_separator()
self.filemenu.add_command(label="Save
As",accelerator="Ctrl+A",command=self.s # Adding Undo text Command
aveasfile)
self.menubar.add_cascade(label="Edit",
self.filemenu.add_command(label="Exit", menu=self.editmenu)
accelerator="Ctrl+E",command=self.exit)
# Creating Help Menu
# Cascading filemenu to menubar
self.helpmenu =
self.menubar.add_cascade(label="File", Menu(self.menubar,font=("times new
menu=self.filemenu) roman",12,"bold"),activebackground="sky
blue",tearoff=0)
# Creating Edit Menu
# Adding About Command
self.editmenu =
Menu(self.menubar,font=("times new
roman",12,"bold"),activebackground="sky self.helpmenu.add_command(label="Abou
blue",tearoff=0) t",command=self.infoabout)
self.editmenu.add_command(label="Cut", self.menubar.add_cascade(label="Help",
accelerator="Ctrl+X",command=self.cut) menu=self.helpmenu)
scrol_y =
self.editmenu.add_command(label="Copy Scrollbar(self.root,orient=VERTICAL)
",accelerator="Ctrl+C",command=self.cop
y) # Creating Text Area
9
roman",15,"bold"),state="normal",relief= self.settitle()
GROOVE)
# updating status
# Packing scrollbar to root window
self.status.set("New File Created")
scrol_y.pack(side=RIGHT,fill=Y)
# Defining Open File Funtion
# Adding Scrollbar to text area
def openfile(self,*args):
self.title.set(self.filename) self.txtarea.delete("1.0",END)
# checking if filename not none # Reading the data from text area
# Reading the data from text area # opening File in write mode
outfile.write(data) outfile.close()
self.settitle() self.settitle()
self.saveasfile() messagebox.showerror("Exception",e)
11
else: infile.close()
self.txtarea.delete("1.0",END)
self.txtarea.event_generate("<<Copy>>")
# Updating filename as None
# Defining Paste Funtion
self.filename = None
def paste(self,*args):
# Calling Set title
self.txtarea.event_generate("<<Paste>>") self.settitle()
try: messagebox.showerror("Exception",e)
# Inserting data Line by line into text # Binding Ctrl+n to newfile funtion
area
self.txtarea.bind("<Control-
for line in infile: n>",self.newfile)
self.txtarea.bind("<Control- self.txtarea.bind("<Control-
s>",self.savefile) v>",self.paste)
self.txtarea.bind("<Control- self.txtarea.bind("<Control-
a>",self.saveasfile) u>",self.undo)
5. OUTPUT/SCREENSHOT
13
6. CONCLUSION
In conclusion, the development of a text editor using Python is a challenging yet rewarding
project that requires a combination of programming, GUI development, and external library
integration skills. The project involves the implementation of essential features such as
syntax highlighting, auto-indentation, search and replace, and file saving and loading
14
capabilities, which will help in enhancing productivity and efficiency for users. By
completing this project, one can gain valuable experience in developing GUI applications
using Python and integrating with external libraries. Overall, a fully functional text editor can
be a useful tool for programming or other text-based tasks, and this project provides an
excellent opportunity to learn and practice important programming concepts.
The text editor using Python is a useful project that provides a user-friendly interface with
various features for editing and saving text-based files. It can be used for programming or
other text-based tasks and provides valuable experience in developing GUI applications using
Python and integrating with external libraries. The project timeline provides a clear roadmap
for the development of the project, and the expected outcome is a fully functional text editor
that meets the objectives of the project. Overall, this project is an excellent opportunity to
enhance your skills in Python programming, GUI development, and working with external
libraries.
6.Reference
1. https://www.airccse.org/journal/cnc/5313cnc10.pdf
2. https://www.geeksforgeeks.org/image-steganography-in-cryptography/
3. file:///C:/Users/DELL/Downloads/Paper98.pdf
15
WEEKLY PROGRESS REPORT
MICRO PROJECT
16
SR.NO WEEK ACTIVITY PERFORMED SIGN OF DATE
. GUIDE
17
1. 1st Discussion and finalization of topic
ANEEXURE II
18
Title of the project: Implement communication system using
steganography, encrypt image & message using any cryptography
technique.
CO’s addressed by the Micro Project:
Apply the various Steganography and Cryptography concept .
Major Learning outcomes achieved by students by doing the Project:
(b)Unit Outcomes in cognitive Domain
a. Identify risks related to Computer security and Information hazard in various
situations.
b. Apply cryptographic algorithms and protocols to maintain Computer Security.
19
(Signature of Faculty)
Prof. KARANJE.P.P
20