Zope stdin

Darrell dgallion1 at yahoo.com
Sun Mar 10 18:51:44 EST 2002


http://www.zope.org/Members/haqa/ZCGI

Janez Jere wrote:

> HHi,
> could anyone help me port my simple cgi to zope script. Problem which I
> am unable to solve is reading posted raw data (legacy client posts a xml
> document to my cgi and expects a result).
> 
> Among all my attempts the closest solutions are:
> request.get(BODY) # BODYFILE a
> and
> request.stdin.read() # but it is not allowed to access read method.
> 
> #echo cgi
> import sys, os
> length = os.environ['CONTENT_LENGTH']
> print 'Content-Type: text/plain'
> print
> print sys.stdin.read(int(length))
> 
> Thank for help.
> Janez




More information about the Python-list mailing list