On Wed, 18 Jun 2003 18:01:01 +0300 GMT (..17:01 where i live(GMT+2) ) leiz@esiee.fr asked the Zope mailinglist about the following:
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()
If you try doing this in a script(python) it will fail. The through-the-web-scripts are restricted security-wise. You need to use an external method to modify files on the filesystem http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ScriptingZope.st... -- Geir Bækholt