[Zope] Accessing Files within Zope?
Fri, 5 Jul 2002 12:31:32 +0200
On Friday 05 July 2002 06:58, Dianne Van Dulken wrote:
> Hi all,
> I have just set up a folder which is designed to contain details of all=
> users. I've set up a ZClass for these users.
> The problem I am having is the transferance from our old system to our =
> one. I have a file containing all the email addresses of the old users
> (which is all I need initially), one per line, and want to write a scri=
> that steps through this file and processes the users into the Zope
> The problem I am having is that I am finding it impossible to actually =
> the file within zope so you can actually use it. I've tried scripting =
> filein =3D open(file)
Write an external method or load the file into the zope database via the=20
> I've tried it in Zope methods with
> "<dtml-in "_.getitem(file).split('\n')">
> But that assumes it is a string (I admit, it was wishful thinking when =
> tried that).
> Does anyone know of a way to read a text file, contained in zope, and s=
> through it? I've looked in the archives, and not found a way.
save that file as DTML-Document, not as file. then you can achieve what y=
intent with <dtml-in "nameOfYourDataObject().split('\n')">
I doubt, therefore I might be.