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.
- Open Files: Open and edit existing
.txt
files. - Save Files: Save the current text as a new
.txt
file.
Make sure you have Python installed on your machine. This script uses the built-in tkinter
library, so no additional installations are necessary.
- Run the script by executing the following command:
python gui_notepad.py
- 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.
- 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.
- 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.