[Zope] Python script URL

Brian Sullivan brians@meetingbywire.com
Fri, 7 Dec 2001 22:55:10 -0500


>  > I have been playing around with existing Python scripts 
> and have found  > that I need to determine the URL of the 
> script itself. Actually what I  > need is the equivalent of 
> the URLx construct for the http Request object  > that works 
> with for the URL of the script.
> 
>    url= script.absolute_url() # to get the URL
> 
> 


Unfortunately this does not work ( at least not in the situation I am
using it) - it seems to return a url that is the url of http request
with the name of the script tacked on:

Like:

http://mysite/test/name_of_script


When the real location of the script is

http://mysite/test/directory1/directory2/scripts/name_of_script


Surely there is some reliable way of getting the second information!