Pyjamas

Pyjamas is a toolkit and library designed to enable writing AJAX applications in Python.
Download

Pyjamas Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • James Tauber
  • Publisher web site:
  • http://jtauber.com/pyso

Pyjamas Tags


Pyjamas Description

Pyjamas is a toolkit and library designed to enable writing AJAX applications in Python. Pyjamas is a toolkit and library designed to enable writing AJAX applications in Python. Pyjamas is based on Google's GWT, which does the same thing for Java.ike GWT, pyjamas involves the translation of the application and libraries (including UI widgets and DOM classes) to Javascript and the packaging up of that Javascript code. There are two core developer tools included with pyjamas. pyjs translates Python code to Javascript by walking the Python abstract syntax tree and generating Javascript.In many cases, built-in Python types require a custom Javascript implementation. For example, even though Python lists are similar to Javascript arrays, Python lists are converted to custom objects that implement methods like append. These custom objects required for translation by pyjs are defined in a library called pyjslib.Like GWT, pyjamas comes with a set of UI widgets as well as a library for DOM manipulation. These libraries are written in Python but are, like everything else, translated to Javascript for deployment. The overall translation of individual components is managed by build which also creates the necessary boilerplate code. The result is a set of .html and .js files that can be served up by a Web server.There are other components planned which have not been covered here such as server-side code for communication in client-server applications. What's New in This Release: · Fixed Autocompletion which just needed non-modal on PopupPanel (thanks to lovelysystems for implementing non-modal dialogs otherwise it wouldn't be possible to fix Autocompletion) · Added implementation of metaclass "type" function · Made KeyboardListener a singleton module rather than have a class named the same as the module. Likewise with MouseListener, Event and Focus. · Added Right-clickable Context Menus, and added an example in KitchenSink Menus.py to show how to set them up. · Added python-spidermonkey as an experimental platform, exactly like pyv8run.py now there is pysmrun.py · Top-level global variables, and top-level functions, now correctly scope in a module (thanks to Jose for raising this one) · String constants are now returned as instances of String() which results in them having the __iter__ method that has been added to the proto of the javascript base String type. · made TypeError inherit from BaseException rather than being a javascript proto from Error(). TypeError can now be raised as an Exception, with a message. · made == comparison use __eq__, which conditionally uses __cmp__ if it is available: this fixes bugs in comparison of lists in the LibTest. replaced a large number of numerical "==" comparisons with "is", so that __eq__ doesn't get called (efficiency). · added support for calling *args on functions: previously, a call function(*args) would result in the args being thrown away! · made Tuple its own class, rather than inheriting from List, in order that it can be distinguished from List. __cmp__ of a List with a Tuple now correctly fails. · rewrote the examples/libtest so that they can be run under standard python (python ./LibTest.py). this allows for a comparison of pyjs against standard python. · add method extend to pyjslib.List · add float to builtins · add pyjamas.log based on examples/libtest/write.py · registered builtin function 'cmp'. was already implemented but not registered in pyjs.py · added an --optimize option to which results in removing print statements. this could be further improved. e.g. when assert is implemented · fixed Mozilla "Permission Denied" bug in DOM.isOrHasChild · pyjslib.Dict now use the hash method to generate keys internally, so it si possible to use objects as keys like in python. For limitations on dicts read examples/libtest/DictTest.py


Pyjamas Related Software