Re: [ZPT] How to create a file "on the fly" ?
Chris Withers wrote: Nicolas Georgakopoulos wrote: Okay, now where can I find a brick wall to go and smash my head into? Are you mad ? :-( Only since trying to help you out ;-) Please don't give up :-) ! OK for the mail but for the file I think this is the right list , doesn't ? end up here because when I ask for help on zope@zope.org they try to help me answering with DTML method's.. I don't know anything abut DTML NO. This is the Zope Page Template list, for ZPT, and ZPT only. That's PRESENTATION, right? ;-) I guess you are right . Thanks for helping me. ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Nicolas Georgakopoulos wrote: Okay, now where can I find a brick wall to go and smash my head into? Are you mad ? :-( Only since trying to help you out ;-) OK for the mail but for the file I think this is the right list , doesn't ? NO. This is the Zope Page Template list, for ZPT, and ZPT only. That's PRESENTATION, right? ;-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Chris Withers wrote: Nicolas Georgakopoulos wrote: It is a text file that I want to create . Like I say it I want to create it -> mail it -> and delete it when it have been mailed... Okay, now where can I find a brick wall to go and smash my head into? Are you mad ? :-( LOOK! Just because you want to mail a file attachment, doesn't mean oyu HAVE to create any kind of "file object", you just want to build a correctly formatted mail message and mail it. Ok I want to create a file so I can mail it , but any way I want to know how to create a file for future purpose... Now, lets head back to zope@zope.org and see if we can help you out? okay? OK for the mail but for the file I think this is the right list , doesn't ? ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Nicolas Georgakopoulos wrote: It is a text file that I want to create . Like I say it I want to create it -> mail it -> and delete it when it have been mailed... Okay, now where can I find a brick wall to go and smash my head into? LOOK! Just because you want to mail a file attachment, doesn't mean oyu HAVE to create any kind of "file object", you just want to build a correctly formatted mail message and mail it. Now, lets head back to zope@zope.org and see if we can help you out? okay? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Nicolas Georgakopoulos wrote: I have a page that users fill info and a button to submit that info. When the button is pressed I want to create a file with some text content. 1.How can I create a file to send it by mail ? 2.When I have send the file by mail I want the file to be deleted. How I delete a file? The file I want to create must be text file with unicode support. you need to use the stringIO module, which means an external method ...or appropriate security declarations. What Nicolas really wants is MailTemplates, or at worst, python's email package (which MailTemplates prodvides security declarations for) but he's run into some problems and seems reluctant to try and help me figure out where he's going wrong. He seems to prefer, instead, to rehash complete discussions on the wrong list rather than actually trying to work through one solution to its conclusion ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Tino Wildenhain wrote: Nicolas Georgakopoulos schrieb: ... Because I'm using ZTP and so far I have found documentation about creating file's only byt DTML examples. What kind of "file" are you going to create? If its XML - like, you can use a pagetemplate just fine. If its more cvs-like (plain text) you just issue some print commands in a python script and get the complete string in printed. Its not so complicated as you seem to think! It is a text file that I want to create . Like I say it I want to create it -> mail it -> and delete it when it have been mailed... ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Kenneth Gonsalves wrote: On Thursday 13 Oct 2005 2:04 pm, Nicolas Georgakopoulos wrote: I have a page that users fill info and a button to submit that info. When the button is pressed I want to create a file with some text content. 1.How can I create a file to send it by mail ? 2.When I have send the file by mail I want the file to be deleted. How I delete a file? The file I want to create must be text file with unicode support. you need to use the stringIO module, which means an external method when you say external method you mean from an external product ? ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
On Thursday 13 Oct 2005 2:04 pm, Nicolas Georgakopoulos wrote: > I have a page that users fill info and a button to submit that info. > When the button is pressed I want to create a file with some text > content. 1.How can I create a file to send it by mail ? > 2.When I have send the file by mail I want the file to be deleted. > How I delete a file? > > The file I want to create must be text file with unicode support. you need to use the stringIO module, which means an external method -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Nicolas Georgakopoulos schrieb: ... Because I'm using ZTP and so far I have found documentation about creating file's only byt DTML examples. What kind of "file" are you going to create? If its XML - like, you can use a pagetemplate just fine. If its more cvs-like (plain text) you just issue some print commands in a python script and get the complete string in printed. Its not so complicated as you seem to think! ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Nicolas Georgakopoulos schrieb: I have a page that users fill info and a button to submit that info. When the button is pressed I want to create a file with some text content. 1.How can I create a file to send it by mail ? You just build a big fat string. 2.When I have send the file by mail I want the file to be deleted. How I delete a file? You dont create a file so there is nothing you have to delete. Actually in context of mails there is no "file". There is an attachment. Attachments are just areas of a multipart mime message - which is a whole big string. You mailclient turns it into a file when you disattach it (to the filesystem). Btw, you have the complete discussion with hints how to solve it already in zope@zope.org :-) Regards Tino ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Chris Withers wrote: Nicolas Georgakopoulos wrote: I have a page that users fill info and a button to submit that info. When the button is pressed I want to create a file with some text content. 1.How can I create a file to send it by mail ? 2.When I have send the file by mail I want the file to be deleted. How I delete a file? Okay, aside from the fact that you already asked these questions on zope@zope.org, what makes you think a list about page templates is the right place to ask? Chris Because I'm using ZTP and so far I have found documentation about creating file's only byt DTML examples. ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt
Re: [ZPT] How to create a file "on the fly" ?
Nicolas Georgakopoulos wrote: I have a page that users fill info and a button to submit that info. When the button is pressed I want to create a file with some text content. 1.How can I create a file to send it by mail ? 2.When I have send the file by mail I want the file to be deleted. How I delete a file? Okay, aside from the fact that you already asked these questions on zope@zope.org, what makes you think a list about page templates is the right place to ask? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ ZPT mailing list ZPT@zope.org http://mail.zope.org/mailman/listinfo/zpt