Thanks for the link. Staying in touch with all the
available python software and solutions around it is
ussually the most difficult of the language ;)
>
> basically we back to procedural programming. :)
>
> the guys behind nevow[1] are writing a module
> called wolf that allows this type of approach
> to web programming.
>
> here there's a code snippet from an early wolf
> example[2],
> the classic "guess what number is":
>
> def index(self, req):
> yield self._get_username(req)
>
> name = req.args.get("username", [""])[0]
> guesses = 0
> number = random.randint(0, 10)
> hint = "No hint for you!"
>
> while True:
> guesses = guesses + 1
> yield self._get_guess(req, name, hint)
> guess = int(req.args.get("guess", [""])[0])
> if guess > number:
> hint = "Lower"
> elif guess < number:
> hint = "Higher"
> elif guess == number:
> break
> else:
> hint = "Some weirdo error happened."
> yield "<html><body><b>%s won in %d
> guesses.</b></body></html>" %
> (name, guesses)
>
> as you can see you yield _pages_ and write the whole
> process in linear fashion, pretty cool, if you ask
> me.
>
> actually nevow's wolf component is under heavy
> refactoring and still pretty crude, but it's a step
> on the right direction, i think.
>
> bye.
>
> [1] <http://www.nevow.org>
> [2]
>
<http://www.divmod.org/svn/Nevow/sandbox/phunt/wolf/wolf/example.py>
>
>
>
-------------------------------------------------------
> The SF.Net email is sponsored by: Beat the
> post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt
> from ThinkGeek.
> It's fun and FREE -- well,
> almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Webware-discuss mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Webware-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/webware-discuss