Pyjs
![]() | This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
![]() | |
Original author(s) | James Tauber, Google |
---|---|
Developer(s) | Luke Leighton, Anthony C Risinger, Kees Bos |
Initial release | March 2007 |
Stable release | 0.8.1a[1] ![]() |
Repository | |
Written in | Apache License 2.0 |
Website | pyjs |
Pyjs (formerly Pyjamas before May 2012
It contains a stand-alone
Development
Using pyjs, developers can write
Design
The pyjs compiler is written in the programming language Python, and uses it to compile its input into JavaScript, walking the abstract syntax tree of the program being compiled. Although the compiler is stand-alone, the primary use of pyjs is for web development, so there is additional infrastructure for building web applications.
The DOM.py[5] model library is an abstraction layer — a thin layer of Python on top of JavaScript code snippets — use of which provides access to the full Document Object Model of the target browser platform. As with any compiler, the JavaScript snippets are treated as inline assembler.
Furthermore, on top of the DOM.py model library is an additional abstraction layer, ui.py,
Components
The major Pyjs components include:
- pyjs Python-to-JavaScript Compiler
- Translates the programming language Python into JavaScript.
- Python builtin and standard emulation library
- JavaScript implementations of the commonly used modules, builtins and classes in the Python standard runtime library (such as strings, lists, dictionaries, tuples, sets, getattr, map, filter, range, etc.; basic exception handling, a basic datetime and a basic math module).
- pyjs DOM library[5]
- Modules for manipulating the browser DOM.
- pyjs Web UI module[6]
- A module for creating widget engine.
- pyjs Desktop ports
- Support for running pyjs apps as pure Python, under . Pyjs Desktop is conceptually close to GWT "Hosted" mode, except that the applications can be deployed live, under pyjs Desktop, rather than be used exclusively as a debugging tool.
pyjs Desktop
The widget set library
References
- ^ "Release 0.8.1a". 9 May 2012. Retrieved 22 July 2018.
- ^ Infrastructure, endpoint, process changes, clarification by Lex on pyjamas-dev mailing list (May 03, 2012)
- ^ pyjs README
- ^ a b The ui Module Class Hierarchy
- ^ a b DOM module
- ^ a b ui module
- ^ PyjamasDesktop history, Python Wiki
- ^ "Pyjamas Desktop".
- ^ Pyjamas - Python Applications for Desktop and Web, Luke Kenneth Casson Leighton (August 30, 2008)
- ^ Coding in Pyjamas: Apps for Desktop and the Web Luke Kenneth Casson Leighton (November 7, 2008)