#!/usr/bin/env python import sys,os sys.path.insert(0, os.path.abspath('./deps-lib')) import sqlite #import cgi,os.path #import xml.dom.minidom as dom #import md5 #from config import dbname # create the database db = sqlite.connect("tutordb") cursor = db.cursor() cursor.execute("select * from documents order by doc_id") print "Type", "\t", "Id", "\t", "URI" print dt = cursor.fetchone() while dt != None: print dt['doctype'], "\t", dt['doc_id'], "\t", dt["uri"] dt = cursor.fetchone()