1 #!/usr/bin/python 2 import sys, db 3 4 try: 5 arg = sys.argv[1] 6 except: 7 arg = '' 8 9 db = db.db() 10 for record in db.select('* from tko_jobs ' + arg): 11 print record 12