Laszlo Nagy <[EMAIL PROTECTED]> writes:
[...]
> how can I return the redirection URL?
> I tried to get this information from the exception but I could not. Is 
> it possible to read it from the openerdirector?
> Any suggestions?
> 
> 
>             try:
>                self.post_multipart(
>                     url,
>                     [('uploadType','Inventory')],
>                     [('uploadFileName','inv.txt',fdata)]
>                 )
>             except urllib2.HTTPError, e:
>                 if e.code == 302:
>                     return "I would like to get the URL to be redirected 
> to...."
>                 else:
>                     raise                        

redirected_url = e.geturl()


John

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to