Cedric Bellegarde writes:
I'm using zope and I want in a python script load an image in current folder:
-First i've found the method with the os.open fonction,i've created a directory in /usr/lib/zope/lib/python named PythonScriptModules with inside a file named __init__.py: from Products.PythonScripts.Utility import allow_module allow_module(os) I use the container.manage_addProduct['OFSP'].manage_addImage(id+'_img',file,'') function but,when my python script call file = os.open(filename).read(),mozilla tell me my password and loop on authentification "os.open" does not return a file object (but an integer file descriptor). The result does not have a "read" method.
Don't know why you get the "Unauthorized" (usually you are told, what you are not authorized to access, when you refuse to log in. What are you told?)
-Is there an other method to create an image object without using the os.open function???? Use an External Method and "open".
Dieter