Jakob Schou Jensen wrote at 2008-8-29 20:11 +0200: >I would like to create a File object in the and store some text in it from a >Python script.
It depends what you mean by "File object". If you mean a Python "file", sitting somewhere on your file system, then Andreas' advice is helpful. If you mean a Zope "File" object (an "OFS.Image.File"), then you would create the object in the standard way for creation of Zope objects, that is: destination.manage_addProducts[<product>].<constructor>(<args>). For a "File" object, "<product>" is "OFSP" ("Object File System Product"), "constructor" is "manage_addFile" and the arguments are "id, file='', title='', precondition='', content_type=''". "file" is in fact the content that should be stored in your "File" object. It can be a string or a "file" like object. -- Dieter _______________________________________________ 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 )