checking existance of an url?
Hi, I am trying to write a little python script that checks if a certain URL exists on the server. So what the script gets is the URL as a string, but so far I have not been able to find a way to check if the corresponding objects exists short of using urllib. Is there an easy way of doing this? I have been looking through all kinds of documentation, but found nothing so far. Thanks Ralph
I believe you are looking for 'restrictedTraverse' Stefan --On Montag, 03. Februar 2003 17:10 +0100 Ralph Gauges <ralph.gauges@eml.villa-bosch.de> wrote:
Hi,
I am trying to write a little python script that checks if a certain URL exists on the server. So what the script gets is the URL as a string, but so far I have not been able to find a way to check if the corresponding objects exists short of using urllib. Is there an easy way of doing this? I have been looking through all kinds of documentation, but found nothing so far.
Thanks
Ralph
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/
On Mon, 03 Feb 2003 17:56:03 +0100 "Stefan H. Holek" <stefan@epy.co.at> wrote:
I believe you are looking for 'restrictedTraverse'
Stefan
I don't know, do I? Just kidding, I already looked at restrictedTraverse, but it sais that you traverse the path from the object on which the method was called. This sounds like path would have to be a relative path and not a full URL. What I have is the full URL like http://... OK, I could lea the protocol and the server which would leave an absolute path. But I would have to convert that to a relative path right? Actually I was trying to get around converting the absolute path to a relative path, but that doesn't seem possible. R
You *can* pass an absolute path <http://www.zope.org/Members/michel/Projects/Interfaces/restrictedTraverse> Stefan --On Dienstag, 04. Februar 2003 09:45 +0100 Ralph Gauges <ralph.gauges@eml.villa-bosch.de> wrote:
On Mon, 03 Feb 2003 17:56:03 +0100 "Stefan H. Holek" <stefan@epy.co.at> wrote:
I believe you are looking for 'restrictedTraverse'
Stefan
I don't know, do I? Just kidding, I already looked at restrictedTraverse, but it sais that you traverse the path from the object on which the method was called. This sounds like path would have to be a relative path and not a full URL. What I have is the full URL like http://... OK, I could lea the protocol and the server which would leave an absolute path. But I would have to convert that to a relative path right? Actually I was trying to get around converting the absolute path to a relative path, but that doesn't seem possible.
R
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/
On Tue, 04 Feb 2003 10:51:46 +0100 "Stefan H. Holek" <stefan@epy.co.at> wrote:
You *can* pass an absolute path <http://www.zope.org/Members/michel/Projects/Interfaces/restrictedTraverse>
Ahh. Thanks a lot. I will try that at once. Ralph
participants (2)
-
Ralph Gauges -
Stefan H. Holek