port of GWT GChart to python pyjamas

lkcl luke.leighton at googlemail.com
Sun Aug 30 22:17:56 CEST 2009

the excellent GWT Chart Library, GChart:
is being ported to python, to run under the pyjamas [desktop / web]
widget set:
approximately 15 of the 30 examples and 1 of the 90 test charts have
been ported already, enough to show that the libray is in a mostly
useable state, even after only three days.  pie-charts are proving
slightly problematic (as GChartExample24, which is a pie chart editor,

on the TODO list is:
* the rest of the examples and test charts
* GWT's NumberFormat (a basic one is in place right now)
* GWT's DateFormat (a basic one is in place right now)
* a basic implementation of re.py (for use in pyjs)
* a port of http://code.google.com/p/gwt-canvas/ (for GChart
optimisation purposes)

conversion of the examples from java to python is pretty
straightfoward: pyjamas/contrib/java2py.py is a _very_ basic java to
python converter which takes care of the majority of the global/search/
replace tricks, and also it converts all { } matched braces into the
correct python indentation levels.  when using java2py.py, it relies
on well-formatted code (which 99.9% of GWT is, and 99.5% of GChart
is).  code MUST be converted to actually _have_ braces, so a single-
line "if" statement will give a great deal of grief: pre-editing of
the java code is therefore sometimes required.

please note: no real experience of java programming is required to
convert java into python with java2py.py.

if anyone would like to help out with this porting project, feel free
to check out the source code and submit patches to http://code.google.com/p/pyjamas/issues
and contact http://groups.google.com/group/pyjamas-dev/

More information about the Python-list mailing list