1. #!/usr/bin/python
  2. import os.path
  3. import os
  4. import shutil
  5. import re
  6. videoDirectory = os.listdir("images")
  7. f = open("dir.html", "w")
  8. f.write('<html><head></head><body><ul>')
  9. wl = open("dir.html", "w")
  10. wl.writelines(['<li><a href="images/%s">%s</a></li>' % (wl, wl) for wl in videoDirectory])
  11. f.write('</ul></body></html>')
  12. #f.writelines(['<li><a href="images/%s">%s</a></li>' % (f, f) for f in videoDirectory])
Comments powered by Disqus