dbc = odbc.odbc('AAA')
crsr = dbc.cursor()
crsr.execute("select * from IDWAAA")
row = crsr.fetchone()
f = open(imageFileName, "wb+")
f.write(row[idwphotofield1].value)
Make sure to open the file in binary mode!
There does not seem to be a whole lot of documentation around on the odbc
interface. For instance, I only by chance stumbled on the value attribute,
since it is a build-in.