RE: [Zope-dev] (no subject)
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:ralf.herold@charite.de http://www.knm-poh.charite.de/
-----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Wednesday, October 04, 2000 1:46 PM To: ralf.herold@charite.de Cc: Zope-Dev@zope.org 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".
participants (1)
-
ralf.herold@charite.de