[Zope] call multiple urls from python script

Kevin Carlson khcarlso@bellsouth.net
Fri, 21 Jun 2002 12:24:27 -0400


Joshua,

You can do something like this in an external script:

--------------------
import httplib
server = httplib.HTTP('google.yahoo.com')
server.putrequest('GET', '/bin/query?p=Zope')
server.putheader('Accept', 'text/html')
server.endheaders()

errcode, errmsg, replyheader = server.getreply()

---------------------

Hope that helps,

Kevin

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Joshua Newman
Sent: Friday, June 21, 2002 11:42 AM
To: Zope Users
Subject: [Zope] call multiple urls from python script


I need to call multiple urls from a python script that gets input from
a form.

The script builds several URLs that look like:
(http://some.paging.site&pagernumber=23423424&sender=someone&message=this+sc
ript+sends+text+pages+to+doctors)

And I want to send it as a URL.  It works from any browser but I want
to do it from a python script.

I can't use response.redirect because there are multiple pager numbers
for each script.

Is there some python method (not external method if at all possible)
that's available or some trick that I can
use to send out multiple http requests from a script?

Thanks,
Joshua

p.s. You Germans out there owe an American for the heartbreaking loss
this morning.  We were going all the way... ;)



_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )