Where O Where Did My Data Buffer Go?
chris.gonnerman at newcenturycomputers.net
Thu May 3 15:01:31 CEST 2001
There are many ways to store the data. The main problem is going to be
figuring out who the client is in order to show them the link to the right
Does KBB have documentation on how this bizarre interaction is *supposed* to
----- Original Message -----
From: "Ben Ocean" <zope at thewebsons.com>
To: "Chris Gonnerman" <chris.gonnerman at newcenturycomputers.net>
Cc: <python-list at python.org>
Sent: Thursday, May 03, 2001 5:38 AM
Subject: Re: Where O Where Did My Data Buffer Go?
> First a BIG THANK YOU to everyone that helped, ESPECIALLY Chris and
> Now, one more question for y'all...
> What I *really* need to do is publish all this data to a Web page, which I
> have, no problem. But then, I need to be able to make it so the visitor
> click a link and send that data to the client or call up a printable page
> with the data. So, how can I re-call my script and pass the data back, or
> somehow keep the data from the first call? Here's my broken code (notice
> variable *dataOriginal*):
> import cgi, os
> import string
> print "Content-type: text/html\n\n"
> form = cgi.FieldStorage()
> formOriginal = form # do this to re-use the data for mailing back to
> BladeChevy, etc.
> save = 
> for i in form.keys():
> v = form[i].value
> save.append(i + ": " + v + "\n")
> data = string.join(save,"")
> dataOriginal = data # do this to re-use the data for mailing back to
> BladeChevy, etc.
> data = string.replace(data, "%%", "<br>")
> array = string.split(data, "QueryWindowStatus")
> dataOriginal = string.replace(dataOriginal, "\"", "\\\"")
> print # all sorts of html code
> start = "<center><font style=\"font: italic 800 22px futura\">If you would
> like us to help you purchase this car, <a
> middle = "\">click here!</a><br>For a printable version, <a
> finish = "\">click here!</a></center><br> <br>\n"
> aline = string.join([start, dataOriginal, middle, dataOriginal, finish])
> print aline
> print # the rest of the html code
> At 11:51 PM 5/2/2001 -0500, you wrote:
> >I have been corresponding with Ben on this and I think everyone else
> >would find a clarification of the problem useful.
> >As I understand it, when the end user visits KBB via the framed page,
> >KBB gets a "callback" URL as part of the request. At some point in the
> >future KBB's web server will call Ben's server via that URL and send
> >some arbitrary data. This does not appear to be directly related to the
> >end user's experience.
> >Ben is trying to catch the data being sent and do something with it
> >(presently, email it to himself).
> >BTW the concept of "data buffer" is irrelevant to web servers outside
> >the Windoze world. The server in question is running Linux/Apache,
> >so of course the data being sent via POST is in the sys.stdin stream.
> >Also note for the record that calling cgi.FieldStorage() will *consume*
> >the sys.stdin stream, so that subsequent sys.stdin.read() calls get
> >nothing (i.e. EOF).
More information about the Python-list