[Zope] display results from external source in zpt
Dean Hale
dean.hale at sunderland.ac.uk
Wed Mar 15 07:03:48 EST 2006
Hi Andreas,
Thanks for this i'm trying to use an example below
from urllib import *
url = 'http://site.ac.uk/cgi-bin/evisiontasks?uid=xxx0xxx&fmt=plain'
html = urlretrieve(url).read()
however am receiving the error
Error Value: "from urllib import *" is not allowed
i have followed the readme in python/Products/PythonScripts and
created a __init__.py file and it has created a __init__.pyc file
once the server has restated.
I'm assuming i need to add some extra details to the __init__.py file
is this correct and if so have you any ideas what they would be
from Products.PythonScripts.Utility import allow_module
allow_module('urllib')
Sorry if the answer is obvious.
thanks
dean
On 15 Mar 2006, at 09:23, Andreas Jung wrote:
--On 15. März 2006 09:14:42 +0000 Dean Hale
<dean.hale at sunderland.ac.uk> wrote:
>
> <a href="" tal:define="uid python:member.getProperty('uid')"
> tal:attributes="href
> string:http://site.ac.uk/cgi-bin/tasks?uid=$uid&fmt=plain">view
> results</a>
Look at Python's urllib module.
-aj
-----------------------------------------------------------------------
- Andreas Jung ZOPYX Ltd. & Co
KG -
- E-mail: info at zopyx.com Web: www.zopyx.com,
www.zopyx.de -
-----------------------------------------------------------------------
---------------
Dean Hale
Web Development Manager
Library Services
University of Sunderland
w: https://my.sunderland.ac.uk
t: +44 (0) 191 515 2424
f: +44 (0) 191 515 2904
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060315/c76d5294/attachment.htm
More information about the Zope
mailing list