I'm searching the way to read the content of a file (ascii), from a script. The file is stored into a Zope folder. Thanks in advance, Sylvain
Chatton Sylvain wrote at 2003-3-17 10:37 GMT:
I'm searching the way to read the content of a file (ascii), from a script. The file is stored into a Zope folder.
"OFS.Image.File" objects return their content via "str". Thus, when you convert a File object into a string, you get the file content). This is not true for the derived class "Image". You can use the "read" method in both cases. Dieter
I'm searching the way to read the content of a file (ascii), from a script. The file is stored into a Zope folder.
Sort of depends on where it's coming from. Filesystem or web? But in general, you can just make a File object and let Zope do it for you. One can also write an External method to get stuff from our filesystem. --jcc
participants (3)
-
Chatton Sylvain -
Dieter Maurer -
J Cameron Cooper