Monday, November 6th, 2006

Pyjamas: Pythons answer to GWT

Category: GWT, Python

If you are a python coder who doesn’t like JavaScript and wishes she could stay in python land more, maybe pyjamas is the framework for you.

It is an early stage port of sorts of GWT.

Given that a lot of python goes on at Google, they may be interested in this themselves, and it would be really nice if the underlying JavaScript was shared where it made sense:

  • Shared ugly browser handling fluff
  • Java oddity handling
  • Python oddity handling

Then other languages and platforms could come to the party and play too.


Posted by Dion Almaer at 6:54 pm

3.7 rating from 35 votes


Comments feed TrackBack URI

I’ve never really stopped to think much about it, but I wonder if Python’s dynamic typing won’t get in the way. Considering JavaScript is also dynamically-typed, though, it might work quite well if you just create wrapper objects that interface exactly the same in both Python and JS (I suspect GWT does that). For newer versions of JS it might just get increasingly easier, since JS is borrowing a lot from Python (generators, iterators, functional list expressions, multiple-variable assignment and so on).

A rather interesting project anyway. Kudos to the author.

Comment by Daniel Luz — November 6, 2006

Checked this out last night, and looks very promising. The one thing I don’t like about JavaScript is it can be heavy at times. Seems that GWT runs a lot faster. Python in general runs fast.

Comment by CJ — November 7, 2006

Daniel, besides syntactic conversion and the UI widgets themselves, the wrapper object approach you describe is a big part of what pyjamas does. For example, Python lists get implemented as a wrapper object around Javascript arrays where the wrapper object provides the equivalents of the Python list methods.

Comment by James Tauber — November 7, 2006

How about “If you are a python coder who doesn’t like JavaScript and wish you could stay in python land” instead of some out of the way, token gender equalizer?

Comment by Mike — November 8, 2006

关注AJAX(7):DOM,Script Reference,Script Localization 和 Pyjamas

1。 微软AJAX开发组的 Bertrand LeRoy 在他的博客里对 ASP.NET AJAX 1.0 Beta 2 中DOM事件规范的改变做了解释,之前采用的是 IE 模型 ,但颇遭非议,在最新版本中“改邪归正”

Trackback by — November 8, 2006

i m Python Programer,it’s very short and sweet language,
i don’t like java script at all, when i saw pyjamas ooh it’s realy too good and much faster
so now no need 2 depend upon javascript,

Comment by devyan parmar — December 7, 2006

Mike, how about “If you are a python coder who doesn’t like JavaScript and wish to stay in python land” instead of some out of the way, token extra pronoun?

Comment by George — August 16, 2007

I prefer Python but now that GWT is gaining steam and gathering third party widgets libraries in Java, it might be counter productive to re-implement it in Python. Instead it would be nice if the libraries could directly be made usable from Python ala PyLucene. Although, this isn’t exactly straight forward either.

Comment by James — October 8, 2007

You can write web applications in python – a readable programming language – instead of in HTML and Javascript
Is Javascript and HTML unreadable ??? … if you have no clue even Python could be, so this is quite stupid idea.

Your application’s design can benefit from encapsulating high level concepts into classes and modules.
Doesn’t Javascript have classes and modules ???, I’ve been using javascript for ages now and I can assure you that there classes and modules. Javascript is a high level language and more flexible than Python.

Also, the AJAX library takes care of all the browser interoperability issues on your behalf
I think there are already quite good frameworks, written in Javascript, that do the same in a really efficient way.

I don’t see the point in using this framework in Python to code Javascript and HTML… and believe me, I really like python as a language, one of the best right now, but I’m against these kind of frameworks.

Comment by auspex — January 6, 2010

Leave a comment

You must be logged in to post a comment.