Using self.response.out will also delay sending your entire response
until it is sure to succeed.

If you start generating output using 'print', and then e.g. a
Datastore request times out, or a bug in your code is triggered, you
have no chance to display a friendly error message. Instead the user
will get a half-rendered page with a stack trace embedded in it, or
worse.


David.

2009/5/28 Shedokan <shedok...@gmail.com>:
>
> so I can't print binary data like Images?
>
> On 28 מאי, 21:03, 风笑雪 <kea...@gmail.com> wrote:
>> Print is also OK, but you need handle header by yourself, and it can only
>> output 
>> text.http://code.google.com/intl/en/appengine/docs/python/gettingstarted/h...
>>
>> print 'Content-Type: text/plain'
>> print ''
>> print 'Hello, world!'
>>
>> 2009/5/29 Shedokan <shedok...@gmail.com>
>>
>>
>>
>> > I am wondering why should I use self.response.out.write and not print
>> > everything.
>>
>> > because I am making this app where I have to output from a lot
>> > ofdifferent functions and I am passing the object 'self' everywhere.
>>
>> > thanks.
> >
>



-- 
It is better to be wrong than to be vague.
  — Freeman Dyson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to