Stable: 2.4.2 This is the latest stable release of Programmer's Notepad. Please make sure that you let us know about any bugs that you find. The Hour of Code is a global movement reaching tens of millions of students. One-hour tutorials are available in 45+ languages for all ages.
Work on a simple (but interesting) Python Project – Create a Text Editor (Notepad) in Python.
This project will help you understand functional programming in python as we have implemented almost everything using separate functions. Features of python text editor:
1. Change font family
2. Bold
3. Save the document
Project Prerequisites
The prerequisites of python text editor project are as follows :
Learn Notepad Programming For Beginners
1. Basic concepts of Python
2. Tkinter
To install the libraries, you can use pip installer from the cmd/Terminal:
Download Python Text Editor Code
Please download source code of python text editor – Text Editor Source Code
Creating main.py
Code:
Functions Used:
- Savedoc: It will ask for the location where the user wants to save the current document and then the file name. And finally, it will save the document.
- bolddoc: It will highlight the entire text of the document by changing its style to bold.
- Algerian: It will change the font style of the entire text to Algerian.
- Arial: It will change the font style of the entire text to Arial.
- Courier: It will change the font style of the entire text to Courier
- Cambria: It will change the font style of the entire text to Cambria.
Variables Used:
- root: the main GUI window.
- savebtn: it saves the document by calling savedoc function.
- fontbtn: It is a menu that displays all available fonts. If you want to add more fonts you may add as many as you want, uncommenting the below lines will list all available fonts.
# To know or add more font options
# fonts=list(font.families())
# fonts.sort()
- boldbtn: It calls bolddoc function which highlights the text.
Text Editor Output
Summary
We have successfully developed python text editor (notepad) project. We have many such simple and interesting projects published on our ProjectGurukul, check them, and keep learning.
A website is simply a collection of web-pages. A web page or web documents written in HTML (HyperText Markup Language)
. These Web pages can be viewed using any web browser and Internet.
Html Language is used to write code and programs to create a webpage. It is easy to create a webpage and you can learn it with few basic steps mentioned below:
HTML Program or page can be created by many HTML or Text Editors. These editors are software that help us writing our code with easy user interface. Today, we will see how to create a html or webpage using Notepad Editor.
Notepad editor is built-in text editor in Windows Computers. You can find similar editors in Mac and Linux Operating system as well.
There are many advanced HTML editor or software are also available. However, we will recommend using default and simple editor like notepad for the beginners. That is always a good way to start learning HTML.
Creating a Simple HTML Page using Notepad Editor
Follow the four steps below to create your first web page with Notepad.
Step 1: Open Notepad (Windows)
Windows 8 or later:
Open the Start Screen and Search (Type Notepad)
Windows 7 or previous Windows:Open Start > Programs > Accessories > Notepad
Step 2: Create a New Document
Go to Notepad Menu: File > New
A New blank document will be opened and you can start writing your first HTML Program here.
Step 3: Write Some HTML code or Program
Write some HTML code. If you do not know about HTML Yet, read few chapters in HTML Tutorials Section.
Write your own HTML code or simply copy the following HTML Simple Program into notepad document.
Step 4: Save the HTML Page
Go to Notepad Menu: File > Save (or use short-key CTRL + S)
It will ask you to Save the file on your computer. Give it a name with .html extension and Save it (for example program.html)
Note: HTML page should be saved with .html
extension carefully.
Notepad Programming Codes
Step 5: View the HTML Page using Browser
Web browsers are programs or software that are used to view Webpages/Websites. You can find Internet Explored by default if using Windows Computer machine. You can also download other popular web browsers such as Google Chrome or Firefox. Use any of them.
Now Simply, open the saved HTML file in any browser:
Double click on the file or right-click on the file and choose 'Open with' option to select other browser.
You HTML File will be opened in web browser and it will show output based on your html program.
Congratulations if you are able to run your first HTML Program.
You can now learn more about HTML Tags and create more HTML web pages. Using these HTML Pages, you can easily create your own website as well.
Tutorials |
---|
HTML Page Structure |
Exercises & Assignments |
---|
Steps to Create a Webpage in HTML using Notepad |
Write an HTML program to display hello world. |
Learn Notepad Programming Tutorial
Interview Questions & Answers |
---|
No Content Found. |