[Zope] Iterating over objects in ZODB
Niels Dettenbach
nd at syndicat.com
Wed May 13 13:57:30 CEST 2015
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
---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.zope.org/pipermail/zope/attachments/20150513/3755648d/attachment.sig>
More information about the Zope
mailing list