By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,857 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,857 IT Pros & Developers. It's quick & easy.

component / event based web framework for python?

P: n/a
Hello all,

I've been surveying the field of python web frameworks for a while but
there are just too many so I ask mighty Usenet.

Is there a component / event based web framework for python? Something
that can abstract you from the request/response mechanism and ideally
from html and javascript altogether?

As examples -- in other languages -- of what I have in mind:
- in java: wingS, GWT, echo (2,3), karora, thinwire, itmill, and
maybe others
- in javascript: cappuccino
- in lisp: weblocks
- in smalltalk: seaside, aida/web
- in .net: asp.net

I would like to be able to write code equivalent to this C# example:

============
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Button b = new Button();
b.Text = "say hello";
b.Click += Button1_Click;
Panel1.Controls.Add(b);
}

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "Hello dynamically created on the fly
UI !!!";
}
}
}
============

Thanks
Jaime
Sep 15 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jaime Barciela schrieb:
Hello all,

I've been surveying the field of python web frameworks for a while but
there are just too many so I ask mighty Usenet.

Is there a component / event based web framework for python? Something
that can abstract you from the request/response mechanism and ideally
from html and javascript altogether?
You might consider taking a look at tosca-widgets, which are used to
create re-usable components of javascript, css and html. They can be
used in any WSGI-capable environment, but TurboGears and Pylons are best
known for incorporating them.

http://toscawidgets.org/documentation/

Diez
Sep 15 '08 #2

P: n/a
On Sep 15, 4:53 pm, Jaime Barciela <jbarci...@gmail.comwrote:
Hello all,

I've been surveying the field ofpythonweb frameworks for a while but
there are just too many so I ask mighty Usenet.

Is there a component / event based web framework forpython? Something
that can abstract you from the request/response mechanism and ideally
from html and javascript altogether?
yep. Pyjamas. http://pyjs.org

in fact, it's _so_ abstracted from html and javascript that i ported
pyjamas to the desktop, using python bindings to glib bindings to
webkit - see http://webkit.org or better:

http://pyjd.org

As examples -- in other languages -- of what I have in mind:
- in java: wingS,GWT, echo (2,3), karora, thinwire, itmill,
Pyjamas is a port of GWT to python.
I would like to be able to write code equivalent to this C# example:

============
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Button b = new Button();
b.Text = "say hello";
b.Click += Button1_Click;
Panel1.Controls.Add(b);
}

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "Hello dynamically created on the fly
UI !!!";
}
}}
how about this:

from pyjamas import Window
from pyjamas.ui import Button, RootPanel

def greet(sender):
Window.alert("Hello, AJAX!")

class Hello:
def onModuleLoad(self):
b = Button("Click me", greet)
RootPanel().add(b)

is that close enough? :) does it look _remotely_ like javascript,
html, or even like it's web programming? doesn't it remind you of
pygtk2 rather a lot? :)

more working examples at http://pyjs.org/examples/

l.

Oct 10 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.