#!/usr/local/bin/python2.6 import os, sys, datetime from flask import Flask, render_template import actorNames3 app = Flask(__name__) @app.route('/') def welcome(): output = ('

Welcome

' + 'Hello World! I am Scott ' + '\n with UID '+str(os.getuid()) + ' in pid '+str(os.getpid()) + '\n

using Python '+sys.version + '\n

the time is '+datetime.datetime.now().ctime() + '\n

Go here for a list of actors' ) return output @app.route('/actors') def overview(): conn = actorNames3.getConn() info = actorNames3.getList(conn) return render_template('list.html', desc='Actors and their birthdates', array=info) if __name__ == '__main__': app.debug = True port = os.getuid() # Flask will print the port anyhow, but let's do so too print('Running on port '+str(port)) app.run('0.0.0.0',port)