This Python script provides a simple graphical user interface (GUI) Notepad application that allows users to open and save text files. It is built using the tkinter library, which comes with Python.
Features
- Open Files: Open and edit existing
.txtfiles. - Save Files: Save the current text as a new
.txtfile.
Requirements
Make sure you have Python installed on your machine. This script uses the built-in tkinter library, so no additional installations are necessary.
Usage
Opening Files
- Run the script by executing the following command:
- Click on the "File" menu and select "Open" to browse and open a .txt file.
- The contents of the selected file will be loaded into the text editor for editing.
Saving Files
- After making edits, click on the "File" menu and select "Save As" to save your work as a new .txt file.
- The file will be saved with the provided name in the location of your choice.
Example
- Open an existing text file:
- Click on "File" -> "Open" and select the .txt file you want to edit.
- Edit the contents in the text area.
- Save the edited text:
- Click on "File" -> "Save As" to save the changes to a new or existing file.