Re: [Tutor] From SQL Blobs to Python Buffers to Actual Files

2010-06-04 Thread Steven D'Aprano
On Sat, 5 Jun 2010 03:51:02 am GoodPotatoes wrote: > When I write the blob/binary data to a file and give it its original > file name "customer1.rtf", I am expecting the application to read the > binary data into text,excel,word documents, or whatever application > created the file originally. > >

Re: [Tutor] From SQL Blobs to Python Buffers to Actual Files

2010-06-04 Thread GoodPotatoes
hon is a buffer: >>> row[3] When I print row[3] I get data like "xڵVKsÛ6î93ù{ÈÁîÈ2%۱" When I print str(row[3]) I get the same data. From: Steven D'Aprano To: tutor@python.org Sent: Thu, June 3, 2010 9:18:44 PM Subject: Re: [Tutor] Fr

Re: [Tutor] From SQL Blobs to Python Buffers to Actual Files

2010-06-03 Thread Steven D'Aprano
On Fri, 4 Jun 2010 10:57:07 am GoodPotatoes wrote: > I have been given a legacy database, and need to read the binaryfiles > out to a disk. The table has columns "filename" and "binaryFile", > where the binaryFile is a BLOB > > My python script so far is: > > import pyodbc > cnxn=pyodbc.Connectio