@@ -0,0 +1,357 @@
+import psycopg2%0Aimport sys%0A%0Afrom connect import connect_to_db%0A%0A# connect to database%0Aconn = connect_to_db()%0Acur = conn.cursor()%0A%0A# SQL for inserting values into db%0ASQL = %22SELECT * FROM BBT_CHART ORDER BY DATE;%22%0A%0A# execute SQL command plus data%0Acur.execute(SQL)%0A%0Arows = cur.fetchall()%0A%0Afor row in rows:%0A    print str(row) + '%5Cn'%0A%0A%0Aconn.commit()%0Aconn.close()%0A

add print_data file and code for fetching/printing rows