> Again, after some searching, I am looking for the syntax to write  a
> file / append to a file in a Local File System.
>
> This is certainly where my Python days seem to slow my down b/c I
> would have just:
>
> contents = open('/path/file.txt', "r")
>
> to read and
>
> contents = open('/path/file.txt', "a")
>
> to append.
>
> I am sure that I am missing some bit of Zope Zen here...
>
> Please point me in the right direction...
>

To write a new file you would use the manage_upload method. To append a file,
you could read the contents of an existing file, append your data, then call
manage_upload to overwrite the file. See the LocalFS/DTML faq at
http://www.zope.org/Members/jfarr for information on how to access the contents
of a local file.

You may also consider just using an external method to do what you're trying to
accomplish.

--jfarr



_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to