[ANN] Pyjamas 0.7pre1 Web Widget Set and python-to-javascript Compiler released

Luke Kenneth Casson Leighton luke.leighton at googlemail.com
Wed Nov 4 19:17:23 CET 2009

Current Release: 0.7~pre1

This is a 0.7 prerelease of Pyjamas, to invite users to help test the
latest version.  The latest svn is regularly but informally tested
against the regression tests and the examples, and used in production,
but not extensively tested against all known browsers on each commit.
Community assistance by running against a wider range of browsers ensures
that *you* get a stable release.


Pyjamas is a port of Google Web Toolkit to Python, and thus enables
the development of Rich Media AJAX applications in Python, with no
need for special browser plugins.  Pyjamas contains a stand-alone
python-to-javascript compiler, and also a Widget Set API that looks
very similar to Desktop Widget Set APIs (such as PyQT4 or PyGTK2).

Pyjamas also contains a Desktop Widget Set version, running as
pure python.  Using web browser technology provides an
alternative to PyQT4 and PyGTK2 that has the advantage of having
full support for HTML, CSS, Plugin and other web-related features
already built-in.  For the windows port, this can save users around
30mb of downloads, as MSHTML is preinstalled as part of IE.

For more information, see:


Known bugs: http://code.google.com/p/pyjamas/issues
            #290, #227, #228, #230, #304

Changelog Summary

Features and enhancements of the stand-alone 0.7 series javascript
compiler include:

* the addition of generators (support for yield, by rewriting the function
  so that it can be re-called and continue from the previous state);

* the beginnings of decorators support, and support for properties;

* some dramatic performance improvements due to a rewrite of for-loops;

* improved support for import syntax (from . import module);

* the addition of a built-in AST parser, use of which allows python 2.4
  to compile programs with python 2.5 / 2.6 syntax into javascript;

* addition of int and long types, and support for operator functions,
  so that e.g list multiplication by numbers and list addition now work,
  along with coercion between int, float and long types, and support
  for floating point exceptions.

Overall, this release is a significant "pythonic" upgrade: for full
details, see the CHANGELOG.

In the User-Interface suite, which is separate from the Pyjamas
stand-alone python-to-javascript compiler, the features and
enhancements include:

* An SVG / VML Canvas Library (a port of GWTCanvas).  This has been ported
  to pure python, and consequently work under Pyjamas-Desktop as well.

* A Graphical Chart Library (a port of GChart). This has been ported
  to pure python, and consequently work under Pyjamas-Desktop as well.
  For the same speed optimisations present in GChart, GChart for Pyjamas
  can also use the python port of GWTCanvas.

* An internal restructure of Event handling, similar to GWT 1.7,
  providing Focus, Mouse and Click "Mixin" modules so that developers
  creating their own widgets have a minimal amount of work to do.
  This redesign could only take place once Pyjamas supported multiple
  inheritance (added in 0.6).


Pyjamas runs your application in a Web Browser (as javascript);
Pyjamas-Desktop runs exactly the same python application on the
Desktop (as python)


Release 0.6 of Pyjamas incorporated Pyjamas-Desktop directly into
the Pyjamas Distribution.  To use Pyjamas-Desktop there are three choices,
with more planned [MacOSX PyObjC; KDE's PyKHTML].

All ports of Pyjamas-Desktop will require a JSON library to be
installed: as there are plenty already, it is counter-productive
to write yet another one.  Simplejson is recommended.

1) - XULRunner

install hulahop and python-xpcom.  hulahop is distributed with
both Debian and Ubuntu; python-xpcom is part of XULRunner and is
also distributed with both Debian and Ubuntu.  Other users should
investigate the installation instructions for python-xpcom and
hulahop for the operating system of their choice on the appropriate
web sites.

GNU/Linux, FreeBSD and other POSIX systems are strongly advised
to use XULRunner for Pyjamas-Desktop: it is the most stable of the
PyJD ports.

2) - PyWebKitGtk

you will need a patched version of pywebkitgtk:

you will need a patched version of webkit:

Detailed build instructions are available here:


For Windows users, all that's required, other than installing python
and Internet Explorer, is one further package: Win32 "comtypes".

Win32 "comtypes" can be downloaded here:
* http://sourceforge.net/projects/comtypes/

More information about the Python-announce-list mailing list