[Zope] File handling under Zope
Phil Harris
phil.harris@zope.co.uk
Thu, 26 Jul 2001 17:00:33 +0100
You'd have to move this code into an external method.
Script (Python) doesn't allow you to interact with the filesystem in anyway.
----- Original Message -----
From: "Kerekes Lajos" <lkerekes@xperts.hu>
To: <zope@zope.org>
Sent: Thursday, July 26, 2001 4:51 PM
Subject: [Zope] File handling under Zope
> Hello!
>
> I'd like to make files in the OS (Linux), under Zope.
> I try this, but it doesn't work.
> DTML method:
> <dtml-call expr="writeFile(this(), id='test')">
>
> Python Script "writeFile":
> filename = '/tmp/' + id
> file = open(filename, 'w')
> file.write('foo, bar, text\n')
> file.close
>
> But I get an error:
>
> Error Type: NameError
> Error Value: open
>
> How should I try this?
>
> Lajos
>
>
> _______________________________________________
> 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 )