Skip to content

Instantly share code, notes, and snippets.

@jee1mr jee1mr/htmlizer.py
Last active Aug 29, 2015

Embed
What would you like to do?
Puts all the images in a folder to the html file and opens it in a web browser
from glob import glob
import webbrowser
images = glob("*.jpg") + glob("*.png")
images.sort()
f = open("comic.html","w")
imgbegin = "<img src='"
imgend = "'>"
for src in images:
f.write(imgbegin+src+imgend+"<br><br>")
f.close()
webbrowser.open("comic.html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.