ASP Response.BinaryWrite in Python

Peter Hansen peter at engcorp.com
Fri Jun 11 07:03:49 EDT 2004


Sam Sungshik Kong wrote:

> I'm writing ASP in Python.
> I want to return an image stream from my ASP code
> so that it will look like
> <img src="image.asp">.
> 
> The problem is that Response.BinaryWrite only accepts SafeArray of Bytes as
> parameter, if I understand it correctly.

This sounds a lot more like an ASP question than a Python
one, given that you already know how to read the image
file into a Python string.  It looks like you need some
method for converting the string to a SafeArray, whatever
that is, so you should probably consult the API for the
interface you are using, maybe on the Microsoft site...

-Peter



More information about the Python-list mailing list