On Wed, May 21, 2008 at 2:48 PM, Michele Petrazzo
<[EMAIL PROTECTED]> wrote:
>
>
> On 21 Mag, 14:08, "Hermann Kaser" <[EMAIL PROTECTED]> wrote:
>> On Wed, May 21, 2008 at 1:55 PM, Michele Petrazzo
>>
>> <[EMAIL PROTECTED]> wrote:
>> > Yes, I'm using 0.3, but how can use yield?
>>
>> I mention yield because if I'm not mistaken, in 0.3, you can print
>> stuff out as the script progresses rather than wait for script to
>> finish. I suggest you try it out by writing a very basic function that
>> yields text and sleeps for a couple seconds in between. I don't
>> currently use 0.3 so I can't give you any working examples. Oh, and
>> yeild is used just like print.
>>
>
> Just tried various code, but no output since the time time ends:
>
> import time
> import web
>
> urls = ("/", "hello")
>
> class hello:
> def GET(self):
> for i in xrange(3):
> yield "hello\n"
> time.sleep(1)
>
> app = web.application(urls, globals()).run()
>
> My browser "wait" 3 seconds and after show me the whole page.
My apologies then, I was under the impression that this would work.
Regards,
Hermann Käser
http://theragingche.com/
http://semicir.cl/user/hermzz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---