How to make web pages with images automatically with Python

from glob import glob
import os
import sys

'''
	Takes all the png and create a web page
	that displays all the images centered
	with a black background

'''


images = glob("*.png")
html = "<style>body{color:white;background:black}</style>"
for i in images:
	html += f"<center><img src='{i}'><br></center>"
with open("file.html", "w") as file:
	file.write(html)
os.system("file.html")
sys.exit()

Subscribe to the newsletter for updates
Tkinter templates
My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts