Welcome to the repository for my File I/O exploration in Python, inspired by CS50's Introduction to Programming with Python course. This repository contains various scripts demonstrating how to read from and write to files, manipulate CSV data, create GIFs, and more.
costume.py
: Generates GIF images from a series of input images.names.py
: Reads names from a text file and prints a sorted list.students.py
: Writes user input to a CSV file.shirt.py
: Overlays a shirt image on top of another image.scourgify.py
: Transforms and cleans CSV data.pizza.py
: Displays CSV data as a formatted table.lines.py
: Counts the number of lines of code in a Python file, excluding comments and blank lines.
- Python 3.x
- Pillow library: Install using
pip install pillow
- Tabulate library: Install using
pip install tabulate
-
Clone the repository:
git clone https://github.com/bonheurNE07/file_io.git cd file_io
-
Run the scripts with the appropriate input files. Below are some examples:
$ python costume.py costume1.gif costume2.gif
Ensure you have a names.txt
file with names listed line by line.
python names.py
python students.py
$ cd shirt
$ python shirt.py before1.jpg after1.jpg
$ python shirt.py before2.jpg after2.jpg
$ python shirt.py before3.jpg after3.jpg
$ cd scourgify
$ python scourgify.py before.csv after.csv
$ cd pizza
$ python pizza.py regular.csv
$ cd lines
$ python lines.py test.py
I invite everyone to contribute to this project for improvements and additional functionalities. If you have suggestions or improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
This repository is inspired by CS50's Introduction to Programming with Python course. Special thanks to the CS50 team for their excellent educational content.
File I/O is a powerful feature in Python that allows us to read from and write to files, manipulate data, and perform various operations. The examples provided here are just a glimpse of what you can achieve with file handling in Python.
Feel free to check out the complete code, share your thoughts, and contribute to the project. I will continue to update the repository with more examples of file manipulations, including Excel and Word file handling. Happy coding!
NDEZE BONHEUR EMMANUEL
Thank you for visiting! If you like this project, please give it a star ⭐ on GitHub.