Skip to content

Instantly share code, notes, and snippets.

@jee1mr
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jee1mr/139b809973674fdc4bc0 to your computer and use it in GitHub Desktop.
Save jee1mr/139b809973674fdc4bc0 to your computer and use it in GitHub Desktop.
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