Re: New releases

"Toby D. Reeves" <[email protected]>
Newsgroups gmane.network.up2date.current.devel
Message-ID <[email protected]>
John,

> > Whats on the TODO?
>         Wanna help me try to figure out how to shove a binary data
> stream out a mod_python handler?  Request.write() expects a string,
> which ain't binary.  Something doesn't like me.
> 

I suppose I'm not telling you anything you don't know already...

The python 1.5.2 PyString object is composed of a buffer pointer and a length.  
It is not null terminated.  It is VERY often used as a generic binary "thing".  
Request.write() will be OK for binary data if where ever its argument goes into 
the C call it is PyArg_ParseTuple'd with a "S#" instead of a "S" format 
character.  

I just looked at its source and it does just that!  You should be Fine.


Toby
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.