#!/usr/bin/python import sys, db try: arg = sys.argv[1] except: arg = '' db = db.db() for record in db.select('* from jobs ' + arg): print record