[Zope] Accessing arbitrary Python objects from ZPT

Michael Lausch mla@1012surf.net
29 Mar 2002 14:55:33 +0100


--=-Fi1eK+vJCdSK3e5wpHWz
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

how to make attributes of arbitrary complex python objects (assume you
don't have access to the python source code of these objects) accessible
from zope, without reverting to tricks like marshalling the objects into
dictionaries?

will a deeper look into the ZSQL source code help me mastering this
problem?

i have some functions from a python application which give back objects
as their return value. i want to access attributes from these objects
from ZPT. I'm calling the functions via external methods which return
the objects. it is also possible to display the objects themselves
(their __str__ or __repr__ function is called). when i want to access a
member variable of such an object, zope wants me to authenticate again.
i know, this has something to do with security an i also read the
appropriate chapter in the zope developer guide, but i don't want to
implement a container for each class which transforms objects into
dictionaries and perhaps back again. BTW persistance is not needed, it
is even a thing i never want for these type of objects.


--=20
Michael Lausch
See my web page <http://www.lausch.at/> or query PGP key server for PGP
key.
"Reality is that which, when you stop believing in it, doesn't go away".
                -- Philip K. Dick

--=-Fi1eK+vJCdSK3e5wpHWz
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

iQCVAwUAPKRyVdo6LU1iyZXZAQLcawP+JR6cyGjVn6YhareOIof8KLu0TE9FiiVX
ob4Rr0LqHramm6d2VCbVInlecex7b7uAZvS2kdOyvKQmgODUI+RbmA0DIvBGLjKF
wME14LUEZNzGtIrAKeh1oU8RWUEc1ztgLFUQFu3uwIsdZ75w0QwGiA1eNdbv9dpa
KFqu9dZ6nn8=
=3FaV
-----END PGP SIGNATURE-----

--=-Fi1eK+vJCdSK3e5wpHWz--