# Collection of code snippets by Arne Vajhøj 
# (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import rdb

print('Rdb from Python')
attach = rdb.statement("ATTACH 'FILENAME disk4:[rdb]test'")
attach.execute()
curs = rdb.statement("SELECT f1,f2 FROM t1")
curs.execute()
for row in curs:
    print('%d %s' % (row[0], row[1]))
