[Tutor] Read only buffer tuple ?
james dean
jamesdean@hotmail.com
Thu May 22 14:58:56 2003
Hi all, I have a file writing problem.
I am extracting some text from a database and opening a file to write it to
and I get this error.
f.write(msg[0])
TypeError: read-only buffer, tuple
Here is the code I am using:
sql = "SELECT message FROM email WHERE emailid='%s'" % (rows[0])
msg = con1.query(sql).getresult()
f = open('temp','w')
f.write(msg[0])
f.close
What am I doing wrong?
Thanks for your help.
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail