[Zope] Redirect without displaying page
J Cameron Cooper
jccooper at jcameroncooper.com
Thu Aug 28 20:11:00 EDT 2003
>I am trying to integrate our systems with an external email list company.
>They provide a URL with various arguments relating to email address, first
>name, last name etc.
>
>I need to be able to call (from a python script) the external URL with
>arguments as if it were a function. I do not want to display the results of
>the call, other than to validate that the call succeeded. How do I go about
>achieving this? Is there a python method for doing this?
>
>
What I would do:
1. Create an external method that takes as arguments the parameters you
want to use in constructing your URL.
2. Do so.
3. Use urllib, urllib2, or call wget or curl to visit that URL. Best bet
is urllib2, I think.
4. If it gives you a reasonable status code, return whatever value makes
sense for success. Otherwise, do opposite.
You can then call this External Method from anywhere in Zope, and
nothing will care what is going on behind-the-scenes.
--jcc
More information about the Zope
mailing list