Wa0000.

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

INTRODUCTION

A text editor is a tool that allows a user to create and revise documents in a computer.
Though this task can be carried out in other modes, the word text editor commonly refers to
the tool that does this interactively. Earlier computer documents used to be primarily plain
text documents, but nowadays due to improved input-output mechanisms and file formats, a
document frequently contains pictures along with texts whose appearance (script, size, colour
and style) can be varied within the document. Apart from producing output of such wide
tovariety, text editors today provide many advanced features of interactiveness and output.

TYPES OF TEXT EDITORS:


Depending on how editing is performed, and the type of output that can be generated, editors
can be broadly classified as -

a)Line Editors - During original creation lines of text are recognised and delimited by
end-of-line markers, and during subsequent revision, the line must be explicitly specified by
line number or by some pattern context. eg. edlin editor in early MS-DOS systems.

b)Stream Editors- The idea here is similar to line editor, but the entire text is treated as a
single stream of characters. Hence the location for revision cannot be specified using line
numbers. Locations for revision are either specified by explicit positioning or by using
pattern context. eg. sed in Unix/Linux.

Line editors and stream editors are suitable for text-only documents.

c)Screen Editors - These allow the document to be viewed and operated upon as a two
dimensional plane, of which a portion may be displayed at a time. Any portion may be
specified for display and location for revision can be specified anywhere within the displayed
portion. eg. vi, emacs, etc.

d)Word Processors - Provides additional features to basic screen editors. Usually support
non-textual contents and choice of fonts, style, etc.

e)Structure Editors - These are editors for specific types of documents, so that the editor
recognises the structure/syntax of the document being prepared and helps in maintaining that
structure/syntax.

HARDWARE AND SOFTWARE REQUIMENTS:

The hardware and software requirements for developing a text editor app depend on the type
of app and the operating system you're using:

RAM: At least 8 GB of RAM is recommended, but 16 GB is better. RAM is important for


running apps, opening files, and compiling code.
CPU: A mid-range processor from the last few years is usually enough, but a powerful CPU
can help.

Storage: A solid-state drive (SSD) is faster and more reliable than a traditional hard drive.
You should consider at least 256 GB of storage space.

Display: A minimum resolution of 1920x1080 (Full HD) is recommended.

Keyboard and mouse: A comfortable, reliable keyboard and mouse are essential.

External storage: An external hard drive or cloud storage solution is recommended for
regular backups and easy access to files.

ADVANTAGES AND DISADVANTAGES :

Debugging : Integrated debugging tools in an IDE can help identify and fix errors in code,
which can improve code quality and reduce debugging time.

Collaboration:Collaborative development can help developers work together on projects and


share ideas, which can reduce the time it takes to release apps.

Cross-platform compatibility:Cross-platform app development allows developers to build


mobile apps using a universal language, making the app compatible with multiple mobile
platforms.

Limited customization:Some editors, like WYSIWYG editors, may not provide as much
control as manually coding. Developers may also find it difficult to edit the code generated.

Free of cost:Some text editors, like Visual Studio Code, are free to download and use, which
can be a good choice for individual developers and small teams.

Text storage:Text editors are a good way to store text information, but they may not be able
to handle more involved formatting.

SOURCE CODE

import tkinter as tk

from tkinter import filedialog


root=tk.Tk()

root.title("Text Editor")

text_widget=tk.Text(root)

text_widget.pack(fill="both", expand=True)
def open_file():

file_path=filedialog.askopenfilename()

if fila_path:

with open(file_path,"r") as file:

text_widget.insert("1.0", file.read())

def save_file():

file_path=filedialog.asksaveasfilename()

if file_path:

with open(file_path,"w") as file:

file.write(text_widget.get("1.0","end"))

def cut():

text_widget.event_generate("<<Cut>>")

def copy():

text_widget.event_generate("<<copy>>")

def paste():

text_widget.event_generate("<<Paste>>")

def select_all():

text_widget.tag_add("sel","1.0","end")
menu_bar=tk.Menu(root)

file_menu=tk.Menu(menu_bar,tearoff=0)

file_menu.add_command(label="open",command=open_file)

file_menu.add_command(label="save",command=save_file)

file_menu.add_separator()

file_menu.add_command(label="Exit",command=root.quit)

menu_bar.add_cascade(label="File",menu=file_menu)

edit_menu=tk.Menu(menu_bar,tearoff=0)

edit_menu.add_command(label="Cut",command=cut)

edit_menu.add_command(label="copy",command=copy)

edit_menu.add_command(label="paste",command=paste)

edit_menu.add_separator()

edit_menu.add_command(label="Select All",command=select_all)

menu_bar.add_cascade(label="Edit",menu=edit_menu)

root.config(menu=menu_bar)

root.mainloop()

OUTPUT
BIBLIOGRAPHY
1. http://www.google.com/

2. http://en.wikipedia.org

3. Computer science book by

sumita Arora

You might also like