Hello Dieter, dear list readers,
I recently asked how to read in and render the contents of
an external file, which doesn't work anymore using
Zope 2.2.2 an LocalFS' xxx.read(), and You responded that
> The quickest solution for you would be an external method
> that gets the file, performs the "read" and returns the result.
Now I use in an external method fsreadin a .py-module with
import sys
def readinfile (self, html):
"""Ralf Herolds way to read in local file objects."""
file = open(html, "r")
filecontent = file.read()
file.close()
return filecontent
which is referenced in a DTML method by
<dtml-var "fsreadin('/tmp/var/thewantedtext.html')">.
It works, but I almost cannot believe that this is that
simple - am I missing something, is security a concern?
Thanks for answering, Yours. Ralf Herold
mailto:[EMAIL PROTECTED] http://www.knm-poh.charite.de/
> -----Original Message-----
> From: Dieter Maurer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 04, 2000 1:46 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope-dev] (no subject)
> In earlier Zope versions, a method without a permission meant
> "can be used freely". Now, it means "cannot be used via DTML/URL".
>
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )