Re: Iterating over objects in ZODB

Niels Dettenbach <nd-ImmFMecdQhFWk0Htik3J/[email protected]> Wed, 13 May 2015 13:57:30 +0200
Newsgroups gmane.comp.web.zope.general
Organization Syndicat IT&Internet
Message-ID <2201822.Nhz8cIhMP1@gongo>
Am Mittwoch, 13. Mai 2015, 11:36:03 schrieb Rich Harley:
> is returned. How can I access the actual contents of the Python Script?
The python script object seems a bit more complex then a DTML-Method object - 
means you have to access the script content of the python script object 
directly (not shure if it's "params" and "body" - have to look into Zope help 
(PythonScript.py) or Zope sources for the exact "field").

regarduing the object docs it shoudl work with .read() directly (if it IS a 
PythonScript object) or "document_src":

    def read():
        """

        Return the body of the Python Script, with a special comment
        block prepended.  This block contains meta-data in the form of
        comment lines as expected by the 'write' method.

        """
    def document_src(REQUEST=None, RESPONSE=None):
        """

        Return the text of the 'read' method, with content type
        'text/plain' set on the RESPONSE.

        """


hth a bit and works,


Niels.
-- 
 ---
 Niels Dettenbach
 Syndicat IT & Internet
 http://www.syndicat.com
 PGP: https://syndicat.com/pub_key.asc
 ---

_______________________________________________
Zope maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABCgAGBQJVUzwqAAoJEA27WohFkipEa9sQAKUX2txSyju0q2BbOQGPNZ0f
6DtTIFUt7cBk5GdSHjGcRgMytEuydJ2sOTwtagy/WmkBp/Ntc78FW1+13WyCxnml
pk6zCbn61o1G95DDMKz7/8uSQNwUNDWpNgg34tvsJAfP+9H3k3Q4AMpRv5Lmhrqm
72lvS+awgRQ7np7AY0GlaJSj6Vf8r610c1IBDZvmxrDiLlthdJzek2uInAH8gk5F
BFFwVHcSUZwxZh/O0wI5RQPAUJHVtbh1MdXFKr2TCmMPMHTruGRPYt28dVs7o1Om
1ykh+vn1M+7wGVUi2RjuXHbdAs3npCpPRMJn/yMwrUOPs/Mq4TXHX0QDUdsJXUw7
2J8oRDJLE6u4BrH7c54s/vrDs+w/UrmMr/0EH+4On/QErdSEjx6teKyqV7zBK3GQ
S9jwL5Te2r6fIqGgBZQHTyCEU4xPaCnfiVeKxxU2QCN61+e0tBfEa2xgm39Y4Ph4
/sLW/rwqd12MxorEB+Xsc14Nvmpkcsw2WNg9CmjnqvhdwSC7ML4xX6IweCEcsso7
IpVOYRKBtUcmuab1Nu+w4HOrnL5WT2GqfG04ukkL1dnmCuTg1swU+ljG+SpGuTyB
mU5+SMhHlQmNoXGSMYNE5Ylbu49PLwwt/qQNF2dU9I0jjZCZbsE3SYPXxolWO+R5
Q15beiyqck4eq0kHdqlJ
=swMe
-----END PGP SIGNATURE-----