0% found this document useful (0 votes)
47 views34 pages

Final Fs Project

This document summarizes a mini project report on implementing a text editor. The text editor will provide features like text formatting, file management, spell-checking, word count, and find-and-replace. It aims to create a versatile and user-friendly tool for writing, editing and managing documents. The text editor will also allow customizations like themes, color schemes and layouts to personalize the editing environment. The goal is to develop a reliable tool that enhances productivity for a wide range of users and their editing needs.

Uploaded by

Rohit Kattimani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views34 pages

Final Fs Project

This document summarizes a mini project report on implementing a text editor. The text editor will provide features like text formatting, file management, spell-checking, word count, and find-and-replace. It aims to create a versatile and user-friendly tool for writing, editing and managing documents. The text editor will also allow customizations like themes, color schemes and layouts to personalize the editing environment. The goal is to develop a reliable tool that enhances productivity for a wide range of users and their editing needs.

Uploaded by

Rohit Kattimani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

VISVESVARAYA TECHNOLOGICAL UNIVERSITY JNANA

SANGAM, BELAGAVI-590018

A
MINI PROJECT REPORT ON

“TEXT EDITOR IMPLEMENTATION”


Submitted in partial fulfilment of the Bachelor Degree
In
INFORMATION SCIENCE AND ENGINEERING

VI SEMESTER

FILE STRUCTURES LABORATORY WITH MINI PROJECT (18ISL67)

Submitted By

ROHIT KATTIMANI 1HK20IS038

MOHAMMED SAIFUDDIN 1HK20IS050


RABANI

Under the guidance of

Prof. SNEHA K
Assistant Professor

Department of Information Science and Engineering 2022-2023

Accredited by NAAC
HKBK COLLEGE OF ENGINEERING
22/1, Nagawara, Bengaluru – 5600 045.
E-mail: [email protected], URL: www.hkbk.edu.in
HKBK COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING

PROGRAMME EDUCATIONAL OBJECTIVES (PEOs)

⮚ PEO 1: To Empower Students through Wholesome Education to achieve academic excellent


education in the field of Information Science and Engineering

⮚ PEO 2: To Provide Students with in-depth disciplinary knowledge in engineering


fundamentals that require to succeed in Information Science and Engineering.

⮚ PEO 3: To Create Highly Qualified Professionals in multi-disciplinary areas with the


knowledge of Information Technologies, Services Globally

⮚ PEO 4: To Inculcate in Students Professional and Ethical attitude with a strong character
with effective communication skills, teamwork skills, multidisciplinary approach, and an
ability to relate Engineering issues to broader social context.

⮚ PEO 5: To Provide Students with an academic environment aware of advanced technological


growth leading to life-long learning through innovation and research with professional ethics
that uplifts mankind

PROGRAM SPECIFIC OUTCOMES(PSOs)

Professional Skills:
An ability to identify and analyse requirements, and in designing and implementing well-
tested technology solutions for rapidly changing computing problems and information
system environments.

Problem-Solving Skills:
An ability to Design, develop and optimize solutions for information systems
employing fundamentals of system hardware & software, graph theory, finite
automata, data storage and communication networks.

Collaborative Skills:
An ability to communicate and develop leadership skills and work effectively in team
environments. They are capable of collaborating to design and implement well tested
solutions for rapidly changing computing problems and information system environments.

Successful Career and Entrepreneurship Skills:


An ability to adapt for innovation and changes and be successful in ethical professional
careers along with the impact of computing on society, and platforms in creating innovative
career paths to be an entrepreneur, and a zest for higher studies.
Accredited by NAAC

BENGALURU – 560 045 DEPARTMENT OF INFORMATION


SCIENCE AND ENGINEERING VISVESVARAYA TECHNOLOGICAL
UNIVERSITY

MINI PROJECT REPORT


ON

“TEXT EDITOR IMPLEMENTATION”


Submitted in partial fulfilment of the Mini Project in
VI Semester
FILE STRUCTURES LABORATORY WITH
MINI PROJECT (18ISL67)

2022-23

SUBMITTED BY:

ROHIT KATTIMANI 1HK20IS038

MOHAMMED SAIFUDDIN 1HK20IS050


RABBANI

HKBK COLLEGE OF ENGINEERING


Accredited by

DEPARTMENT OF INFORMATION SCIENCE AND


ENGINEERING

CERTIFICATE

This is to certify that the content of this mini project entitled “Text Editor
Implementation” is a bonafide work carried out by ROHIT KATTIMANI
(1HK20IS038) , MOHAMMED SAIFUDDIN RABBANI (1HK20IS050) in partial fulfilment for
the award of Degree of Bachelor of Engineering in Information Science and Engineering of
the Visvesvaraya Technological University, Belagavi during the year 2022-23. It is certified
that all corrections / suggestions indicated for the Internal Assessment have been incorporated
in the mini project report deposited in the departmental library. The Mini Project report has
been approved as it satisfies the academic requirements in respect of File Structures Laboratory
with Mini Project (18ISl67)prescribed for the Bachelor of Engineering Degree.

Signature of the guide Signature of the HOD Signature of the Principal

Prof. Sneha K Dr A Syed Mustafa Prof. Tabassum ara


Assistant Professor Principal
Professor & HOD
Dept. of ISE, HKBKCE HKBKCE
Dept. of ISE, HKBKCE
DECLARATION

We here by declare that the entire work embodied in this Project work “Text Editor
Implementation” has been carried out by us during the sixth semester of Bachelor of
Engineering in Information Science and Engineering at HKBK College of Engineering,
Bengaluru affiliated to Visvesvaraya Technological University, Belagavi, under the guidance
of Prof. Sneha K, HKBK College of Engineering, Bengaluru. The work embodied in this
project work is original and it has not been submitted in part time or full-time completion for
any other degree in any other university.

ROHIT KATTIMANI 1HK20IS038

MOHAMMED SAIFUDDIN 1HK20IS050


RABBANI

I
ACKNOWLEDGEMENT

I would like to place our regards and acknowledgement to all who helped in making this
project possible. There are many people who worked behind the screen to help make it
possible the below listed are a few of them.
I would take this opportunity to express our heartfelt gratitude to Mr.C M Ibrahim,
Chairman, Mr.C M Faiz Mohammed, Director and Prof. Tabassum ara, Principal for
the entire infrastructure provided to complete the project in time.
I am deeply indebted to Dr.A Syed Mustafa, HOD, Information Science and Engineering
for the ineffable encouragement he provided in successful completion of the project.
I am sincerely thank our mini project co-ordinator , Prof. Sneha K for their constantly guiding
and assisting for the project.
I am extremely thankful to the teaching and non-teaching staff of the Department of
Information Science and Engineering for their valuable guidance and cooperation
throughout our dissertation.

ROHIT KATTIMANI 1HK20IS038


SAIFUDDIN RABBANI 1HK20IS050

II
ABSTRACT

"Text Editor Implementation" is a project focused on developing an efficient and user-


friendly text editing application. The goal is to create a versatile tool that allows users to
easily create, edit, and manage their documents. The text editor will offer various features
such as text formatting, file management, spell-checking, word count, and find-and-
replace functionality. It will provide a seamless and intuitive experience, enabling users to
focus on their content rather than the complexities of the editing process. Additionally,
customization options will allow users to personalize their editing environment according
to their preferences. With its comprehensive set of features, this text editor aims to be a
reliable and versatile tool for a wide range of writing and editing needs. Whether it's
professionals creating documents, students writing essays, or individuals editing code, this
text editor will enhance productivity and accuracy while ensuring a user-friendly interface.

The customization options in the text editor will enable users to personalize their editing
environment according to their preferences. Users will be able to choose from a range of
themes, color schemes, and layout options, ensuring a visually appealing and comfortable
working environment.

By implementing this text editor, users can expect a reliable and versatile tool for their
writing and editing needs. Whether it's creating professional documents, composing
essays, drafting blog posts, or editing code, this text editor will provide a feature-rich and
intuitive interface that caters to a wide array of use cases.
TABLE OF
CONTENT

Chapter. Title Page


No.
Acknowledgement i
Abstract iii
1 INTRODUCTION 1
1.1 About the Project 1
2 LITERATURE SURVEY 2
3 ANALYSIS 3

4 SYSTEM IMPLEMENTATION 5
4.1 Resources Required 5
4.2 Requirement 5
4.3 ER diagram 7
4.4 Use case diagram 8
5 MODULE DESCRIPTION 9

6 SYSTEM DEVELOPMENT 10
7 PROJECT DESCRIPTION 13
7.1 System maintenance 13
7.2 Source code 13

8 SYSTEM TESTING 27
9
RESULT 31

CONCLUSION 34

BIBLIOGRAPHY 35
File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

CHAPTER-1
INTRODUCTION

1.1. FILE STRUCTURES:-


File structure is the Organization of Data in Secondary storage device in such a way
that it minimize the access time and the storage space. A file structure is a
combination of representations for data in files and of operations for accessing the
data.

A file structure allows applications to read, write and modify data. It might
also support finding the data that matches some search criteria or reading
through the data in some particular order.

An indexed file contains records ordered by record key. A record key


uniquely identifies a record and determines the sequence in which is accessed
with respect to other records. Each record contains a field that contains the
record key.

Primary Indexing is defined on an ordered data file. The data file is ordered on
a key field.

1.2 HISTORY OF FILE STRUCTURES:-

Early Work: -
Early Work assumed that files were on tape. Access was sequential – the cost of
access grew in direct proportion to the size of the file.

The emergence of Disks and Indexes: -


As files grew very large, sequential access was not a good solution. Disks
allowed for direct access. Indexes made it possible to keep a list of keys and

HKBKCE, VI SEM DEPT OF ISE 1 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

pointers in a small file that could be searched very quickly. With the key and
pointer, the user had direct access to the large, primary file.

The emergence of Tree Structures: -


Indexes also have a sequential flavor. When they grow too much, they also
become difficult to manage. The idea of using tree structures to manage the index
emerged in the early 60’s. However, trees can grow very unevenly as records are
added and deleted. Resulting in long searches requires many disk accesses to find
a record.

Balanced Trees: -

In 1963, researchers came up with the idea of AVL trees for data in memory.
However, AVL trees did not apply to files. Because they work well when tree
nodes are composed of single records rather than dozens or hundreds of them
in the 1970’s came the idea of B-Trees which require an O (log N) access time.
Where N is the number of entries in the file and k is the number of entries
indexed in a single block of the B-Tree structure. B-Trees can guarantee that we
can find an entry among millions of others with only 3 or 4 trips to the disk.

Hash Tables: -

Retrieving entries in 3 or 4 accesses is good. but it does not reach the goal of
accessing data with a single request. Hashing was a good way to reach this goal
with files that do not change size greatly over time. Recently, Extendible
Dynamic Hashing guarantees one or at most two disk accesses no matter how big
a file becomes.

1.3 FILE PROCESSING

HKBKCE, VI SEM DEPT OF ISE 2 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

The main goal of this application is to simplify the process of record


maintenance of students in an organization. A file system is a method for
storing and computer files and the data they contain to make it easy to find
and access them.
Records of students are stored and retrieved whenever necessary. This is a C++
terminal project which is implemented using the concepts like “VARIABLE
LENGTH
RECORDS” and “INDEXING”.

1.4 IMPLEMENTATION CONCEPT:-VARIABLE LENGTH


RECORDS, INDEXING VARIABLE LENGTH RECORD:-

Variable length refers to anything whose length can vary. For example, in
databases, a variable-length field is a field that does not have a fixed length.
Instead, the field length varies depending on what data is stored in it.

Variable-Length Saves Spaces:-

Variable-length fields are useful because they save space. Suppose, for
example, that you want to define a NAME field. The length of each NAME
field will vary according to the data placed in it. For example, John Smith is
10 characters long, but Thomas Horatio Jefferson is 24 characters long. With
fixed-length fields, you would need to define each field to be long enough to
hold the longest name.

This would be a waste of space for records that had short names. With
variable-length fields, the NAME field in each record would be just long

HKBKCE, VI SEM DEPT OF ISE 3 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

enough to hold its data. If our application generates many short records with
occasional long ones, using fixed-length records wastes a lot of disk space.

INDEXING:

We know that data is stored in the form of records. Every record has a key field,
which helps it to be recognized uniquely.

Indexing is a data structure technique to efficiently retrieve records from the


database files based on some attributes on which the indexing has been done.
Indexing is defined based on its indexing attributes. Indexing can be of the
following types –

Primary Index − Primary index is defined on an ordered data file. The data file
is ordered on a key field. The key field is generally the primary key of the relation.

Secondary Index − Secondary index may be generated from a field which is a


candidate key and has a unique value in every record, or a non-key with duplicate
values.

Clustering Index − Clustering index is defined on an ordered data file. The data
file is ordered on a non-key field.

HKBKCE, VI SEM DEPT OF ISE 4 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

5
Evaluating Different Index Structures:-

No one technique is the best. Each has to be evaluated w.r.t. the following
criteria:-

Access Type: - Finding records with a particular search key, or with the search
key falling in a given range

Access Time: - The time it takes to find item(s) using the index in question.

Insertion Time: - The time to insert an item in the data file, as well as the
Time to update the index.

Deletion Time: - The time to delete the item from the data file (which include
the time to find the item), and the time to update the index.

Search Key Pointer to a data-file record


1.5 PROBLEM STATEMENT:-

The goal is to develop a text editor system that offers comprehensive


functionalities for creating and editing text-based documents. This system should
provide users with a user-friendly interface and a wide range of features, enabling
them to format, manage, and customize their documents efficiently. The text editor
should facilitate seamless document creation and editing, empowering users to
meet their writing and editing needs effectively.

HKBKCE, VI SEM DEPT OF ISE 5 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

1.6 OBJECTIVE AND SCOPE OF THE PROJECT

The objective of the "Text Editor Implementation" mini project is to develop a


user-friendly and feature-rich text editing application. The project aims to create a
tool that allows users to create, edit, and format text-based documents efficiently.
The primary goal is to provide a reliable and versatile text editor that enhances the
writing and editing experience for users.

The scope of the "Text Editor Implementation" mini project includes designing
and implementing a text editing application with a user-friendly interface. The
project will focus on incorporating essential features such as document creation,
editing, formatting, and saving. Additionally, functionalities like spell-checking,
word count, and find-and-replace may be included to improve productivity and
accuracy. The project's scope is to deliver a functional text editor that meets the
needs of users, enabling them to perform various text editing tasks effectively

1.7 EXISTING AND PROPOSED SYSTEM

Existing System: -

The current system lacks advanced features and a user-friendly interface,


resulting in limited functionality and inefficient text editing capabilities.

Proposed System: -

The proposed text editor system aims to provide an intuitive user interface,
enhanced features, and efficient document editing capabilities, offering users a
seamless and productive writing and editing experience.

HKBKCE, VI SEM DEPT OF ISE 6 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

1.8 DESCRIPTION OF MODULES

Add new text file : -


Here the users will be able to create or to write on a new text editor page.

Delete the new text file: -


Here the user would be able to delete the created file.

Modify the order list: -


Using this feature one can make the necessary changes like adding new content
or to change the existing content in the file.

Exit: -
The user can exit from the action.

HKBKCE, VI SEM DEPT OF ISE 7 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

CHAPTER -2
SYSTEM REQUIREMENT SPECIFICATION (SRS)

INTRODUCTION:s

To be used efficiently, all computer software needs certain hardware components


or the other software resource to be presented on a computer. These pre-
requisites are known as (computer) system requirements and are often used as a
guideline as opposed to an absolute rule. Most software defines two sets of
system requirements: minimum and recommended. With increasing demand for
higher
processing power and resources in newer versions of software, system
requirements tend to increase over time. Industry analysts suggest that this trend
plays a bigger part in driving upgrades to existing computer systems than
technological advancements.

2.1 HARDWARE ARE REQUIREMENTS:

The most common set of requirements defined by any operating system or


software application is the physical computer resources, also known as hardware.
A hardware requirements list is often accompanied by a hardware compatibility
list (HCL), especially in case of operating systems. An HCL lists tested,
compatibility and sometimes incompatible device for a particular operation
system or application.

HKBKCE, VI SEM DEPT OF ISE 8 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

HARDWARE REQUIREMENT FOR THE PRESENT PROJECT

Microsoft Compatible keyboard

Processor: Intel Core i3 or above

Processor Speed: @2.67 GHz

R.A.M: 4.0 GB or above

Mouse: Touchpad

Hard Disc: 40 GB

2.2 SOFTWARE REQUIREMENT:

Software Requirements deals with defining software resource requirements and


prerequisites that need to be installed on a computer to provide optimal functioning of an
application. These requirements or pre-requisites are generally not included in the
software installation package and need to be installed separately before the software is
installed.

SOFTWARE REQUIREMENTS FOR THE PRESENT PROJECT:

O.S architecture: Microsoft Windows x86 architecture


Operating System: Windows 7 or above
Tool: DEV C++ compiler and any Suitable Editor

HKBKCE, VI SEM DEPT OF ISE 9 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

CHAPTER -3
ANALYSIS

FEASIBILITY STUDY

The feasibility study for the "Text Editor Implementation" project examines
its technical, operational, and economi viability. The project's technical
feasibility relies on the availability of suitable technologies and resources.
Operationally, the project aims to meet the user requirements for efficient
text editing. The economic feasibility involves evaluating the cost of
development and potential benefits, ensuring a favorable return on
investment. Overall, the study concludes that the text editor implementation
project is feasible and holds the potential for successful implementation

3.1 ECONOMIC FEASIBILITY

This study is carried out to check the economic impact will have on the system
will have on the organization. The amount of fund that the company can pour into
the research and development of the system is limited. The expenditures must be
justified. Thus the developed system as well within the budget and this was
achieved because most of the technologies used are freely available. Only the

customized products have to be purchased.

3.2 TECHNICAL FEASIBILITY

This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand
on the available resources present in the technical feasibility study

HKBKCE, VI SEM DEPT OF ISE 10 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

CHAPTER- 4

SYSTEM DESIGN

Fig: System Design Diagram of Text Editor Implementation

4.1 Working Description:

Compile the codes.


Run the codes.
The menu consists options for inserting, displaying, removing, editing of records,
view summary will appear.
The user can select their choice.

4.2 Used modules or files:


Tkinter:
Message box:
FileDialog:

HKBKCE, VI SEM DEPT OF ISE 11 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

CHAPTER – 5 IMPLEMENTATION

Implementation is the stage of the project when the theoretical design is turned
out into a working system. Thus it can be considered to be the most critical stage
in achieving a successful new system and in giving the user, confidence that the
new system will work and be effective. The implementation stage involves
careful planning, investigation of the existing system and it’s constraints on
implementation, designing of methods to achieve changeover and evaluation of
changeover methods.

5.1 Platform Selection:

Windows 10 Operating System 64 bit: Windows 10 is one of the widely used


GUI based Operating System from Microsoft Corporation. It has many inherent
capabilities for various networking activities and inbuilt applications and supports
as a client operating system for various server environments.

Language Selection: Python, an object oriented approach.

HKBKCE, VI SEM DEPT OF ISE 12 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

5.2 SOURCE CODE:-

from tkinter import *


from tkinter import messagebox
from tkinter import filedialog

class TextEditor:

def init (self,root):


self.root = root
self.root.title("TEXT EDITOR")
self.root.geometry("1200x700+200+150")
self.filename = None
self.title = StringVar()
self.status = StringVar()

self.titlebar = Label(self.root,textvariable=self.title,font=("times new


roman",15,"bold"),bd=2,relief=GROOVE)
self.titlebar.pack(side=TOP,fill=BOTH)
self.settitle()

self.statusbar = Label(self.root,textvariable=self.status,font=("times new


roman",15,"bold"),bd=2,relief=GROOVE)
self.statusbar.pack(side=BOTTOM,fill=BOTH)
self.status.set("Welcome to Text Editor")

self.menubar = Menu(self.root,font=("times new


roman",15,"bold"),activebackground="skyblue")
self.root.config(menu=self.menubar)

self.filemenu = Menu(self.menubar,font=("times new


roman",12,"bold"),activebackground="skyblue",tearoff=0)
self.filemenu.add_command(label="New",accelerator="Ctrl+N",command=self.newfil
e)
self.filemenu.add_command(label="Open",accelerator="Ctrl+O",command=self.openfi
le)

HKBKCE, VI SEM DEPT OF ISE 13 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

self.filemenu.add_command(label="Save",accelerator="Ctrl+S",command=self.sa
vefile)
self.filemenu.add_command(label="Save
As",accelerator="Ctrl+A",command=self.saveasfile)
self.filemenu.add_separator()
self.filemenu.add_command(label="Exit",accelerator="Ctrl+E",command=self.e
xit)
self.menubar.add_cascade(label="File", menu=self.filemenu)

self.editmenu = Menu(self.menubar,font=("times new


roman",12,"bold"),activebackground="skyblue",tearoff=0)
self.editmenu.add_command(label="Cut",accelerator="Ctrl+X",command=self.c
ut)
self.editmenu.add_command(label="Copy",accelerator="Ctrl+C",command=self
.copy)
self.editmenu.add_command(label="Paste",accelerator="Ctrl+V",command=self
.paste)
self.editmenu.add_separator()
self.editmenu.add_command(label="Undo",accelerator="Ctrl+U",command=sel
f.undo)
self.menubar.add_cascade(label="Edit", menu=self.editmenu)

self.helpmenu = Menu(self.menubar,font=("times new


roman",12,"bold"),activebackground="skyblue",tearoff=0)
self.helpmenu.add_command(label="About",command=self.infoabout)
self.menubar.add_cascade(label="Help", menu=self.helpmenu)
scrol_y = Scrollbar(self.root,orient=VERTICAL)

self.txtarea = Text(self.root,yscrollcommand=scrol_y.set,font=("times new


roman",15,"bold"),state="normal",relief=GROOVE)
scrol_y.pack(side=RIGHT,fill=Y)
scrol_y.config(command=self.txtarea.yview)
self.txtarea.pack(fill=BOTH,expand=1)

self.shortcuts()
def settitle(self):
if self.filename:
self.title.set(self.filename)
else:

HKBKCE, VI SEM DEPT OF ISE 14 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

self.title.set("Untitled")

def newfile(self,*args):

self.txtarea.delete("1.0",END)

self.filename = None

self.settitle()

self.status.set("New File Created")

def openfile(self,*args):

try:

self.filename = filedialog.askopenfilename(title = "Select file",filetypes = (("All


Files","*.*"),("Text Files","*.txt"),("Python Files","*.py")))
if self.filename:

infile = open(self.filename,"r")

self.txtarea.delete("1.0",END)

for line in infile:

self.txtarea.insert(END,line)

infile.close()

self.settitle()
self.status.set("Opened Successfully")

except Exception as e:

messagebox.showerror("Exception",e)

self.status.set("Saved Successfully")

else:

self.saveasfile()

except Exception as e:

messagebox.showerror("Exception",e)
def saveasfile(self,*args):
try:

HKBKCE, VI SEM DEPT OF ISE 15 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

untitledfile = filedialog.asksaveasfilename(title = "Save file


As",defaultextension=".txt",initialfile = "Untitled.txt",filetypes = (("All
Files","*.*"),("Text Files","*.txt"),("Python Files","*.py")))
data = self.txtarea.get("1.0",END)
outfile = open(untitledfile,"w")
outfile.write(data)
outfile.close()
self.filename = untitledfile
self.settitle()
self.status.set("Saved Successfully")
except Exception as e:
messagebox.showerror("Exception",e)

def exit(self,*args):
op = messagebox.askyesno("WARNING","Your Unsaved Data May be Lost!!")
if op>0:
self.root.destroy()
else:
return

def cut(self,*args):
self.txtarea.event_generate("<<Cut>>")

def copy(self,*args):
self.txtarea.event_generate("<<Copy>>")

def paste(self,*args):
self.txtarea.event_generate("<<Paste>>")

def undo(self,*args):
try:
if self.filename:
self.txtarea.delete("1.0",END)
infile = open(self.filename,"r")
for line in infile:
self.txtarea.insert(END,line)
infile.close()
self.settitle()
self.status.set("Undone Successfully")
else:
self.txtarea.delete("1.0",END)
self.filename = None

HKBKCE, VI SEM DEPT OF ISE 16 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

self.settitle()
self.status.set("Undone Successfully")
except Exception as e:
messagebox.showerror("Exception",e)

def infoabout(self):
messagebox.showinfo("About Text Editor","A Simple Text Editor\nCreated using
Python.")

def shortcuts(self):
self.txtarea.bind("<Control-n>",self.newfile)
self.txtarea.bind("<Control-o>",self.openfile)
self.txtarea.bind("<Control-s>",self.savefile)
self.txtarea.bind("<Control-a>",self.saveasfile)
self.txtarea.bind("<Control-e>",self.exit)
self.txtarea.bind("<Control-x>",self.cut)
self.txtarea.bind("<Control-c>",self.copy)
self.txtarea.bind("<Control-v>",self.paste)
self.txtarea.bind("<Control-u>",self.undo)

root = Tk()
TextEditor(root)
root.mainloop()

HKBKCE, VI SEM DEPT OF ISE 17 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

CHAPTER- 6 SNAPSHOTS
DISPLAY PAGE

Fig: Display of the Text Editor.

HKBKCE, VI SEM DEPT OF ISE 18 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

Fig: Opening of the existing file.

Fig: Selecting the existing file in the system.

HKBKCE, VI SEM DEPT OF ISE 19 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

Saving of the file:-

Saving the file with the context of Save As:-

HKBKCE, VI SEM DEPT OF ISE 20 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

Opening of the new file and adding content to it:

Fig : 1

Saving the file.

Fig: File saved successfully.

HKBKCE, VI SEM DEPT OF ISE 21 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

CONCLUSION

In conclusion, the text editor is an essential tool for various writing and editing
tasks. It offers a user-friendly interface and a range of features that enhance
productivity and efficiency. With its ability to create, edit, and format text-based
documents, the text editor provides a versatile platform for individuals and
professionals alike.

The convenience of spell-checking, word count, and find-and-replace features


ensures accuracy and precision in written content. The text editor's ability to
manage files and provide customization options further enhances the user
experience.

Through its intuitive design and functionality, the text editor streamlines the
process of document creation, allowing users to focus on their ideas and content
rather than technical complexities. Its ease of use makes it accessible to users of
all skill levels, enabling them to produce high-quality written material.

Moreover, the text editor promotes collaboration by allowing multiple users to


work on the same document simultaneously. This feature fosters teamwork and
increases efficiency in collaborative writing projects.

Additionally, the text editor's compatibility with various file formats ensures
seamless integration with other software and systems. Users can easily import
and export files, making it a versatile tool in today's interconnected digital
landscape.

Overall, the text editor has become an indispensable tool in academia, business,
journalism, and many other fields. Its ability to simplify the writing and editing
process, improve accuracy, and enhance collaboration makes it an essential
component of modern productivity and communication.

HKBKCE, VI SEM DEPT OF ISE 22 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

References

1. Martin, R. C. (2009). Clean Code: A Handbook of Agile


Software Craftsmanship. Prentice Hall.
2. McConnell, S. (2004). Code Complete: A Practical
Handbook of Software Construction. Microsoft Press.
3. Shneiderman, B., & Plaisant, C. (2010). Designing the User
Interface: Strategies for Effective Human-Computer Interaction.
Pearson.
4. Fowler, M. (2002). UML Distilled: A Brief Guide to the
Standard Object Modeling Language. Addison-Wesley
Professional.
5. Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994).
Design Patterns: Elements of Reusable Object-Oriented
Software. Addison-Wesley Professional.

These references provide valuable insights into software


development practices, code quality, user interface design
principles, and software construction techniques, which can be
applied to the development of a text editor implementation.
.

HKBKCE, VI SEM DEPT OF ISE 23 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

HKBK COLLEGE OF ENGINEERING

To empower the students through wholesome education & enable the


students to develop into highly qualified and trained professionals with ethics
and emerge as a responsible citizen to build a vibrant nation. To achieve
academic excellence through in depth knowledge in science, engineering and
technology through dedication to duty, innovation in teaching and faith in
human values.

To enable our students to develop into outstanding professionals with high


ethical standards to face challenges of 21st century

To provide educational opportunities to the deprived and weaker section of


the society to uplift their socio economic status

DEPT. OF INFORMATION SCIENCE AND ENGINEERING

HKBKCE, VI SEM DEPT OF ISE 24 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

HKBKCE, VI SEM DEPT OF ISE 25 AY 2022-23


File Structures Laboratory Mini Project-18ISL67 Text Editor Implementation

HKBK COLLEGE OF ENGINEERING


DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING

PROGRAMME OUTCOMES [POs]

□ PO 1: Engineering knowledge: Apply the knowledge of mathematics science, engineering


fundamentals and an engineering specialization for the solution of complex engineering
problems.

□ PO 2: Problem analysis: Identify, formulate, research literature, and analyze complex


engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.

□ PO 3: Design/development of solutions: system components or processes that meet the specified


needs with appropriate consideration for public health and safety, and cultural, societal, and
environmental considerations.

□ PO 4: Conduct investigations of complex problems: use research based knowledge and research
methods including design of Experiments, analysis & interpretation of data, and synthesis of
the information to provide valid conclusions.

□ PO 5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools, including prediction and understanding of the limitations.

□ PO 6: The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.

□ PO 7: Environment and sustainability: understand the impact of the professional engineering


solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.

□ PO 8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.

□ PO 9: Individual and team work: Function effectively as an individual as a member or a leader in


diverse teams, and in multidisciplinary settings.

□ PO10: Communication: Communicate effectively on complex engineering activity community


and with t h e society at large, such as, being able to comprehend and write effective reports
and design documentation, make effective presentations, and give and receive clear
instructions.

□ PO 11: Project management and finance: engineering and management principles and apply
these to one’s own work, as a member and leader in a team, to manage projects and in
multidisciplinary environments

□ PO 12: Life-long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change

HKBKCE, VI SEM DEPT OF ISE 26 AY 2022-23

You might also like