
Python Project for Practice
Desktop Images Manager Program
Decription
Create a Python program that converts the png files of the downloads folder into JPG and save them in a new folder named with today’s date in the desktop. It is a Python project for practice operating system tasks automation along with the Pillow library.
Steps
- Install Pillow library
- Import necessary modules: OS and Pillow
- Define the function to convert PNG to JPG
- Write a function that takes the path of a PNG file as input and converts it to a JPG file:
- Create a directory for saving the converted files
- Create a directory with today’s date on the desktop for saving the converted files:
- Find and convert PNG files: Find all the PNG files in the Downloads folder and convert them to JPG:
Python project solved
Run the program Open the terminal or command prompt, navigate to the directory where you saved the Python file, and run the following command: python png_to_jpg_converter.py
Find more Python project ideas and keep practicing!