#!/usr/bin/python2.4
import os
import sys
import math
import cgitb; cgitb.enable()
import cgi
sys.path.append("./../")
from magazinelayout import MagazineLayout
def flush():
sys.stdout.flush()
form = cgi.FieldStorage()
template = ''
try:
width = int(form.getfirst('width', '600'), 10)
except ValueError:
width = 600
width = max(width, 200)
try:
padding = int(form.getfirst('padding', '3'), 10)
except ValueError:
padding = 3
padding = max(padding, 0)
print 'Content-Type: text/html\n'
print '''
Select some images below.
' if added > 8: print "You selected more than eight images—some won't be displayed.
" # Generate the form images.sort() size = 100 # Maximum thumbnail size print ('''''' print '''Image credit: NASA
Part of freecog.net | © 2006 Tom W.M.
'''