[Zope] TEXT FILE Operation

Phil Harris phil.harris@zope.co.uk
Tue, 12 Sep 2000 11:25:18 +0100


Marcello,

I'd say the simplest way is to create an external method, something like
(untested):

def addToTextFile(self, thingToAdd = None):
    if thingToAdd:
        f=open('thefile','w')
        f.write(thingToAdd+'\n')
        f.close()

or similar for changing/updating etc.

If you are short on experience for external methods, refer to the Zope
documentation (?) for advice.

hth

phil
phil.harris@zope.co.uk

----- Original Message -----
From: "Marcello Lupo" <lupo@atisworld.com>
To: <zope@zope.org>
Sent: Tuesday, September 12, 2000 11:02 AM
Subject: [Zope] TEXT FILE Operation


> Hi to all,
> anyone know how to let Zope interact with text files on the system on it
> is running.
> Like making changes to files, search and replare some text or insert or
> delete text and save the file again?
> I'm pretty new and i don't know if it is possible for Zope.
> Thank You in advice.
> Marcello
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )