A-Z-Python-Projects
A-Z-Python-Projects copied to clipboard
Feat/file reader
File Reader
This is a simple Python program that reads and displays the content of a text file. It allows you to specify the file name, and it will display the contents of that file. The program handles common error cases more gracefully.
Usage
- Run the program using a Python interpreter.
- You will be prompted to enter the name of the file you want to read.
- The program will then attempt to read and display the content of the specified file.
- If the file is found and can be read, its content will be displayed.
- If the file is not found, an error message will be shown.
- If any other error occurs during file reading, an error message will be displayed.
Program Features
- Graceful handling of errors:
- If the specified file is not found, it will display a user-friendly error message.
- If any other error occurs during file reading, it will display an error message with details.
Prerequisites
- Python 3.x