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:


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.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to