Re: [Zope] How to read a file object
John Poltorak wrote: On Wed, Jun 01, 2005 at 12:46:44PM +0200, Andreas Jung wrote: --On 1. Juni 2005 10:01:22 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: How do I go about reading a Zope file object in Python? Define what "reading a Zope File object" means? You mean you want the body of an upload file? -aj I mean the thing that is created when I click on 'File' from the drop down menu of ZMI. Suppose your file 'myFile' and your script 'myScript' in the same folder. You can get file data in your script using 'data' property: fileData = container.myFile.data ... ___ 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 )
Re: [Zope] Creating links dynamically
John Poltorak wrote: On Tue, May 31, 2005 at 06:23:11PM +0300, Vital Lobachevsky wrote: John Poltorak wrote: I want to provide a set of links on a Zope site dynamically. ie don't want to hard code a number of links, but would like to load them from an external source which I can add to independently, but I have no idea as to how to set about it. Any ideas? I'd be quite happy to have the links in a text file with one link per line. 1) Create a script that returns a list of links: ## Script (Python) "linkList" return [ 'link1', ... 'linkN' ] 2) Use this script on your page. For example, Many thanks for your suggestion. Is there a worked example of doing this anywhere? There seem to be quite a few steps involved in trying to get this working and I'm no expert in writing python scripts, and it will probably take me a couple of days to get this working. Well, it's really easy. Create 'linkList' (Python Script) in the folder where you page lives or somewhere higher in folder hierarchy: ## Script (Python) "linkList" return [ ('http://www.google.com/', 'Google'), ('http://www.yahoo.com/', 'Yahoo'), ] If your page is Page Template, it maybe something like this Search Engines If you page is DTML Method, you can do the same using tag. ___ 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 )
Re: [Zope] sending attachments
Varun Parange wrote: hi, is it possible to send mails with attachments using Zope MailHost?? if so,...how do u achieve it? I use DTML method to send .csv-file as attachment: To: From: Subject: encode="base64" filename="addresses.csv">expr="msgFile"> I hope it helps. ___ 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 )
Re: [Zope] Creating links dynamically
John Poltorak wrote: I want to provide a set of links on a Zope site dynamically. ie don't want to hard code a number of links, but would like to load them from an external source which I can add to independently, but I have no idea as to how to set about it. Any ideas? I'd be quite happy to have the links in a text file with one link per line. 1) Create a script that returns a list of links: ## Script (Python) "linkList" return [ 'link1', ... 'linkN' ] 2) Use this script on your page. For example, ___ 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 )
[Zope] Subfolders of Extensions folder
Hi, all! Can I use the folders in Zope's "Extensions" folder to keep the External Methods in more logical way? -- -tick ___ 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 )