[Zope] Zope and URLLIB

Colin Fox cfox@crystalcherry.com
30 Mar 2002 13:11:38 -0800


--=-3j8Twc57jAGTLAWV/EV8
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I'm trying to do a simple thing:

import urllib
f =3D urllib.urlopen('http://www.somesite.com')
lines =3D f.readlines()

I followed the instructions in PythonScripts/README.txt on how to allow
other modules to be imported by python scripts, and indeed the
urllib.urlopen works.

However, the f.readlines() fails, claiming I don't have permission. The
python documentation says that urllopen() returns a 'file-like' object,
without actually telling me the type.

How do I allow this simple call?

TIA,
 Colin

--=20
Colin Fox                                       cfox@crystalcherry.com
CF Consulting Inc.                                    GPG Fingerprint:
                    D8F0 84E7 E7CC 5C6C 9982  F1A7 A3EB 6EA3 BC97 572F

--=-3j8Twc57jAGTLAWV/EV8
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA8pioKo+tuo7yXVy8RAr1cAKDAiMhUJr5olpYXZhDpjKzqTvtA0ACgvloc
fHGI0W4H3+7MCGA0k6slz/M=
=NQBt
-----END PGP SIGNATURE-----

--=-3j8Twc57jAGTLAWV/EV8--