Wa0000.
Wa0000.
Wa0000.
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.
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.
The hardware and software requirements for developing a text editor app depend on the type
of app and the operating system you're using:
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.
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.
Debugging : Integrated debugging tools in an IDE can help identify and fix errors in code,
which can improve code quality and reduce debugging time.
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
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:
text_widget.insert("1.0", file.read())
def save_file():
file_path=filedialog.asksaveasfilename()
if file_path:
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
sumita Arora