How Do I Get the Buffer Data??

Ben Ocean zope at
Tue May 1 22:59:32 CEST 2001

At 08:09 PM 5/1/2001 +0000, you wrote:
>"Ben Ocean" <zope at> wrote ...
> > Hi;
> > I'm writing a CGI script. One last thing to figure out. The data is being
> > sent to me by a foreign host (around which I frame). They send the data to
> > a URL I specify (in my cgi-bin directory) and send the data to a *data
> > buffer*. I need to call it from that data buffer. How do I do this?
>Do you mean that the data is sent in a separate transmission to a different
>server, or are they sending you data by using method POST on your CGi
>script? If the latter then you can use the cgi module. If the former, I
>think a few more details might be in order.

Thanks for replying. I frame around Kelley Blue Book for a car dealer. The 
data is entered into KBB's page. They hit a submit button and KBB sends the 
data back to a page I specify. They say the data is sent to the data buffer 
and that I am to retrieve it from there.

I tried to research this. All I could come up with is that, apparently, the 
way it's done in perl is:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
Your help (and anyone else' !) is appreciated.

More information about the Python-list mailing list