Re: [Zope] loading an url from a restricted python script
I don't understand still : what I am looking for is a way to read a url whitout having to write an external method. the point is I belived that reading a url in a web application like zope should not require such powerfull tool as external methods or dedicated products.. Andreas Jung wrote:
You answered your question already with our question. Filesystem-based code=trusted code=External methods or Zope products.
-aj
--On 28. Juni 2005 17:05:42 +0200 santiago <chetzacoalt@free.fr> wrote:
sorry, I don't understand: what is th 'filesystem based code' ?
Andreas Jung wrote:
--On 28. Juni 2005 16:53:35 +0200 santiago <chetzacoalt@free.fr> wrote:
hello
I'm writting a restricted python script (in the zmi) and I wish to load an url that the user gives to me in order to diplay it back, inside my web page.
is there a zope method that I can use, or must I relay on an external python script and use urllib ?
This is a FAQ: use filesystem based code.
-aj
santiago wrote:
I don't understand still : what I am looking for is a way to read a url whitout having to write an external method. the point is I belived that reading a url in a web application like zope should not require such powerfull tool as external methods or dedicated products..
There is nothing special about either. They are simply how you do things that are not anticipated by the framework (and screen-scraping isn't that common). Many people seem to have placed artificial walls around the use of External Methods, but there's no good reason for this; they take about 10 seconds more to set up than TTW Python scripts. Look at KebasData: if it works for you it may save you a lot of time. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com
--On 28. Juni 2005 20:40:56 +0200 santiago <chetzacoalt@free.fr> wrote:
I don't understand still : what I am looking for is a way to read a url whitout having to write an external method. the point is I belived that reading a url in a web application like zope should not require such powerfull tool as external methods or dedicated products..
You *have* to write an external method. dot. point. -aj
+-------[ Andreas Jung ]---------------------- | | | --On 28. Juni 2005 20:40:56 +0200 santiago <chetzacoalt@free.fr> wrote: | | >I don't understand still : | >what I am looking for is a way to read a url whitout having to | >write an external method. | >the point is I belived that reading a url in a web application like zope | >should not require such powerfull tool as external methods or dedicated | >products.. | | You *have* to write an external method. dot. point. As some background to why this is so; urrlib can read files from your filesystem, and then send them to anywhere on the internet. Do you really want to allow that by default to anyone that has access to scripting on your server? -- Andrew Milton akm@theinternet.com.au
participants (4)
-
Andreas Jung -
Andrew Milton -
J Cameron Cooper -
santiago