GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • pixindex.py
  • ftptools.py
  • Console log
  • Generated page
  • Generated zipfile
  • pixindex-full-package.zip
  • Unpacked content

This view

  • Original page
  • New address

GeezerVison is showing learning-python.com — pixindex - Photos Page+Zipfile

pixindex — Make/Upload Photos Page+Zipfile

This small Python 3.X program generates an HTML page to view a folder of images — inline in the page, by links in the page, and by an automatically created and linked zipfile of the photos — and then transfers the photos and generated zipfile and HTML page to a site folder by FTP.

This program's page is relatively basic; its HTML can be enhanced arbitrarily by editing the script, and the newer thumbspage program is a more complete gallery solution. Still, this is a prime example of the sorts of tactical roles that Python excels at, in addition to its larger-scale strategic roles.

Resources

See the main script's docstring and other items below for usage details.

Code and docs:

  • pixindex.py — the main script's code (130 lines)
  • ftptools.py — reused PP4E example module

Examples:

  • Console log — example run with FTP upload
  • Generated page — screenshot of generated HTML page
  • Generated zipfile —screenshot of generated photos zipfile

Download

Use the following to fetch pixindex, or view its unzipped content.

  • pixindex-full-package.zip — with all code and examples
  • Unpacked content — zipfile content online

This program was last changed: April 2015.

For a related and more-comprehensive tool that generates image galleries with thumbnails and viewers, see thumbspage. For code that unzips a zipfile, see this page. For more code examples, see the programs page.



[Home page] Books Code Blog Python Author Train Find ©M.Lutz
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.