Binary / SOAPpy
Robert Rawlins - Think Blue
robert.rawlins at thinkbluemedia.co.uk
Fri Jun 8 09:44:14 EDT 2007
Hello Guys,
I have a WebService call which returns an array, the first element in that
array is the binary for a zip file, however I'm having trouble writing that
binary string into an actual file when it arrives, I've tried the following
method.
Result = call to the webservice that returns the array.
file = open("Zips/1.zip", "wb")
file.write(result[0])
file.close()
But this throws the error message:
file.write(result[0])
TypeError: argument 1 must be string or read-only buffer, not instance
Does anyone know what I might be doing wrong? Once I've resaved this file
can then unzip it and get at all its lovely content.
Thanks for any input guys,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070608/6eb9d8bf/attachment.html>
More information about the Python-list
mailing list