Monday, November 6th, 2006
Pyjamas: Pythons answer to GWT
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.













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.
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.
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.
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?
关注AJAX(7):DOM,Script Reference,Script Localization 和 Pyjamas
1。 微软AJAXå¼€å‘组的 Bertrand LeRoy 在他的åšå®¢é‡Œå¯¹ ASP.NET AJAX 1.0 Beta 2 ä¸DOM事件规范的改å˜åšäº†è§£é‡Šï¼Œä¹‹å‰é‡‡ç”¨çš„æ˜¯ IE 模型 ,但颇ééžè®®ï¼Œåœ¨æœ€æ–°ç‰ˆæœ¬ä¸â€œæ”¹é‚ªå½’æ£â€
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,
Ok, thanks for share :)
________________
Free Software | Top Share Site | موبایل ، کامپیوتر
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?
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.