Python & Zope

jonathan.2.wilkinson at bt.com jonathan.2.wilkinson at bt.com
Tue Oct 9 10:21:57 EDT 2001


Anyone, 

I'm trying to do this incredibly simple python script in zope: -

myfile = open('myfile', 'w')
myfile.write('hello\n')
myfile.close()

It works from a python interpreter fine......but when I try to test it I get


Error Type: NameError
Error Value: global name 'open' is not defined
Any ideas how to read/write a text file in zope using python?????Can it be
done? 
Any other methods of writing and reading randomly (well structured sort of
way, but from anywhere within the file) in zope??

Please help, 
Regards, 
Jono






More information about the Python-list mailing list