Linux Today: Linux News On Internet Time.

More on LinuxToday

Pyjamas: writing AJAX applications in Python

Sep 07, 2009, 23:02 (3 Talkback[s])


Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers

"Essentially, a developer uses the pyjamas-supplied libraries that provide user interface widgets and Document Object Model (DOM) control from Python. This code is then combined with a library that implements various Javascript language features in Python—an impedance-matching layer between the two languages called pyjslib—and turned into Javascript and HTML that can be loaded into a browser. The pyjs program "translates Python code to Javascript by walking the Python abstract syntax tree and generating Javascript".

"But, using pyjamas is not at all like "normal" web programming. As the web site and FAQ are quick to point out, pyjamas is not just another AJAX (Asynchronous Javascript and XML) framework, it is more akin to writing a desktop program that is translated into web application. In fact, Pyjamas-Desktop allows the same code that is developed for the web application to be run, unmodified, on the desktop. The same Python source that gets fed into the translator can, instead, be run, and, more importantly, debugged, on the developer's desktop."

Complete Story

Related Stories: