27 Feb
2004
27 Feb
'04
5:11 p.m.
elena@hpcf.upr.edu wrote:
I'm new to Zope. I need access to a text file external to Zope to extract some input information for my Zope database. I installed the LocalFs.1-0-0 product. As soon as I added a LocalFS object, my folder became unaccesible. I could access it after I removed LocalFS product. Can you advice me how to read an external text file with or without LocalFS?
I don't know in which way you need to read the external file, but an external method can do it just as easily as you would do it in Python itself: def read_external_file(self): f = open('path_to_file', 'rb') content = f.read() f.close() return content