[Zope] how to open a file out of Zope and write into it?

Dennis Allison allison@sumeru.stanford.EDU
Wed, 18 Jun 2003 10:57:13 -0700 (PDT)


For security reasons, python scripts (the ones created in the ZMI) 
do not have access to the file system.  You must either use an External 
Method or a Product (both of which are python programs, but require access
to the host file system to create and install).  Perhaps you can use 
the Local File System (LocalFS) or External File System products.  Whether 
they will do the job depends upon wht you are trying to accomplish.

On Wed, 18 Jun 2003 leiz@esiee.fr wrote:

> hello everyone!
> 
> I want to open a file out of Zope and write something into it,and I
> have done one program Python, but the error message is: global name
> 'open' is not defined. I don't known why. would you please help me? 
> thank you!
> 
> this is my program python
> -----------
> request = container.REQUEST
> RESPONSE =  request.RESPONSE
> 
> 
> fd=open('c:/file.txt', 'w')
> fd.write('hello')
> 
> fd.close()
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>