<s>
Pyjs	B-Language
(	O
formerly	O
Pyjamas	B-Language
before	O
May	O
2012	O
)	O
,	O
is	O
a	O
rich	B-Application
web	I-Application
application	I-Application
framework	O
for	O
developing	O
client-side	O
web	O
and	O
desktop	B-Application
applications	I-Application
in	O
Python	B-Language
.	O
</s>
<s>
The	O
resulting	O
applications	O
can	O
be	O
run	O
in	O
a	O
web	B-Application
browser	I-Application
or	O
as	O
standalone	O
desktop	B-Application
applications	I-Application
.	O
</s>
<s>
It	O
contains	O
a	O
stand-alone	O
Python-to-JavaScript	O
compiler	B-Language
,	O
an	O
Ajax	B-General_Concept
framework	I-General_Concept
and	O
widget	B-Library
toolkit	I-Library
,	O
and	O
through	O
use	O
of	O
these	O
components	O
,	O
developers	O
can	O
write	O
comprehensive	O
applications	O
,	O
to	O
run	O
in	O
all	O
major	O
web	B-Application
browsers	I-Application
,	O
without	O
writing	O
any	O
JavaScript	B-Language
.	O
</s>
<s>
Pyjs	B-Language
is	O
a	O
port	O
of	O
Google	B-Language
Web	I-Language
Toolkit	I-Language
(	O
GWT	O
)	O
from	O
Java	B-Language
to	O
Python	B-Language
.	O
</s>
<s>
Using	O
pyjs	B-Language
,	O
developers	O
can	O
write	O
web	B-Application
applications	I-Application
in	O
Python	B-Language
instead	O
of	O
JavaScript	B-Language
.	O
</s>
<s>
The	O
application	O
is	O
compiled	B-Language
to	O
JavaScript	B-Language
.	O
</s>
<s>
Also	O
included	O
is	O
an	O
Ajax	B-General_Concept
library	O
and	O
widget	B-Library
set	I-Library
that	O
provides	O
access	O
to	O
the	O
Document	B-General_Concept
Object	I-General_Concept
Model	I-General_Concept
(	O
DOM	B-General_Concept
)	O
of	O
modern	O
JavaScript-capable	O
web	B-Application
browsers	I-Application
.	O
</s>
<s>
The	O
Ajax	B-General_Concept
library	O
and	O
the	O
widget	B-Library
set	I-Library
library	O
are	O
a	O
hybrid	O
mix	O
of	O
Python	B-Language
and	O
JavaScript	B-Language
.	O
</s>
<s>
Just	O
as	O
with	O
Google	B-Language
Web	I-Language
Toolkit	I-Language
,	O
pyjs	B-Language
is	O
not	O
its	O
libraries	O
,	O
and	O
neither	O
is	O
it	O
just	O
another	O
Ajax	B-General_Concept
framework	I-General_Concept
.	O
</s>
<s>
Ajax	B-General_Concept
frameworks	I-General_Concept
are	O
strictly	O
limited	O
to	O
providing	O
pre-prepared	O
specific	O
functionality	O
,	O
written	O
almost	O
exclusively	O
in	O
tailor-made	O
JavaScript	B-Language
.	O
</s>
<s>
Both	O
GWT	O
and	O
pyjs	B-Language
,	O
being	O
JavaScript	B-Language
compilers	B-Language
,	O
allow	O
the	O
developer	O
to	O
work	O
in	O
the	O
language	O
with	O
which	O
they	O
are	O
familiar	O
(	O
Java	B-Language
or	O
Python	B-Language
,	O
respectively	O
)	O
,	O
to	O
write	O
their	O
own	O
custom	O
widgets	O
,	O
either	O
entirely	O
from	O
scratch	O
or	O
based	O
on	O
the	O
existing	O
available	O
widgets	O
,	O
yet	O
still	O
target	O
the	O
full	O
range	O
of	O
modern	O
browsers	B-Application
.	O
</s>
<s>
So	O
,	O
far	O
from	O
presenting	O
web	O
developers	O
with	O
a	O
fait-accompli	O
Ajax	B-General_Concept
framework	I-General_Concept
,	O
pyjs	B-Language
gives	O
you	O
the	O
freedom	O
to	O
develop	O
your	O
own	O
.	O
</s>
<s>
The	O
pyjs	B-Language
compiler	B-Language
is	O
written	O
in	O
the	O
programming	O
language	O
Python	B-Language
,	O
and	O
uses	O
it	O
to	O
compile	B-Language
its	O
input	O
into	O
JavaScript	B-Language
,	O
walking	O
the	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
of	O
the	O
program	O
being	O
compiled	B-Language
.	O
</s>
<s>
Although	O
the	O
compiler	B-Language
is	O
stand-alone	O
,	O
the	O
primary	O
use	O
of	O
pyjs	B-Language
is	O
for	O
web	O
development	O
,	O
so	O
there	O
is	O
additional	O
infrastructure	O
for	O
building	O
web	B-Application
applications	I-Application
.	O
</s>
<s>
The	O
DOM.py	O
model	O
library	O
is	O
an	O
abstraction	O
layer	O
-	O
a	O
thin	O
layer	O
of	O
Python	B-Language
on	O
top	O
of	O
JavaScript	B-Language
code	O
snippets	O
-	O
use	O
of	O
which	O
provides	O
access	O
to	O
the	O
full	O
Document	B-General_Concept
Object	I-General_Concept
Model	I-General_Concept
of	O
the	O
target	O
browser	B-Application
platform	O
.	O
</s>
<s>
As	O
with	O
any	O
compiler	B-Language
,	O
the	O
JavaScript	B-Language
snippets	O
are	O
treated	O
as	O
inline	B-Language
assembler	I-Language
.	O
</s>
<s>
Furthermore	O
,	O
on	O
top	O
of	O
the	O
DOM.py	O
model	O
library	O
is	O
an	O
additional	O
abstraction	O
layer	O
,	O
ui.py,	O
which	O
provides	O
the	O
most	O
useful	O
layer	O
to	O
web	O
developers	O
:	O
a	O
full	O
suite	O
of	O
widgets	O
with	O
which	O
desktop	B-Application
application	I-Application
developers	O
will	O
be	O
familiar	O
.	O
</s>
<s>
At	O
present	O
,	O
the	O
list	O
of	O
available	O
widgets	O
is	O
a	O
mixture	O
of	O
the	O
complete	O
set	O
of	O
widgets	O
that	O
were	O
available	O
in	O
Google	B-Language
Web	I-Language
Toolkit	I-Language
1.2	O
,	O
along	O
with	O
a	O
few	O
more	O
that	O
have	O
been	O
forward-ported	O
from	O
GWT	O
1.5	O
.	O
</s>
<s>
The	O
major	O
Pyjs	B-Language
components	O
include	O
:	O
</s>
<s>
Translates	O
the	O
programming	O
language	O
Python	B-Language
into	O
JavaScript	B-Language
.	O
</s>
<s>
JavaScript	B-Language
implementations	O
of	O
the	O
commonly	O
used	O
modules	O
,	O
builtins	O
and	O
classes	O
in	O
the	O
Python	B-Language
standard	O
runtime	O
library	O
(	O
such	O
as	O
strings	O
,	O
lists	O
,	O
dictionaries	O
,	O
tuples	O
,	O
sets	O
,	O
getattr	O
,	O
map	O
,	O
filter	O
,	O
range	O
,	O
etc	O
.	O
</s>
<s>
Modules	O
for	O
manipulating	O
the	O
browser	B-Application
DOM	B-General_Concept
.	O
</s>
<s>
A	O
module	O
for	O
creating	O
widgets	O
as	O
if	O
the	O
web	B-Application
browser	I-Application
was	O
a	O
desktop	O
widget	O
engine	O
.	O
</s>
<s>
Support	O
for	O
running	O
pyjs	B-Language
apps	O
as	O
pure	O
Python	B-Language
,	O
under	O
MSHTML	B-Application
(	O
Trident	B-Application
)	O
,	O
Gecko	B-Language
(	O
XULRunner	B-Language
)	O
or	O
WebKit	B-Language
.	O
</s>
<s>
Pyjs	B-Language
Desktop	O
is	O
conceptually	O
close	O
to	O
GWT	O
"	O
Hosted	O
"	O
mode	O
,	O
except	O
that	O
the	O
applications	O
can	O
be	O
deployed	O
live	O
,	O
under	O
pyjs	B-Language
Desktop	O
,	O
rather	O
than	O
be	O
used	O
exclusively	O
as	O
a	O
debugging	O
tool	O
.	O
</s>
<s>
The	O
widget	B-Library
set	I-Library
library	O
that	O
comes	O
with	O
pyjs	B-Language
is	O
so	O
similar	O
to	O
PyQt	B-Language
and	O
PyGTK	B-Language
that	O
a	O
port	O
of	O
pyjs	B-Language
was	O
made	O
to	O
run	O
pyjs	B-Language
applications	O
on	O
the	O
desktop	O
,	O
called	O
pyjs	B-Language
Desktop	O
(	O
formerly	O
PyjamasDesktop	O
before	O
May	O
2012	O
and	O
originally	O
hosted	O
separately	O
prior	O
to	O
version	O
0.6	O
)	O
.	O
</s>
<s>
The	O
project	O
uses	O
Webkit	B-Language
,	O
XULRunner	B-Language
or	O
MSHTML	B-Application
as	O
the	O
underlying	O
technology	O
,	O
and	O
it	O
is	O
through	O
these	O
browser	B-Application
engines	O
that	O
pyjs	B-Language
manipulates	O
the	B-General_Concept
DOM	I-General_Concept
model	O
of	O
the	O
application	O
.	O
</s>
<s>
Together	O
pyjs	B-Language
and	O
pyjs	B-Language
Desktop	O
allow	O
writing	O
cross-platform	O
,	O
cross-desktop	O
,	O
cross-browser	O
and	O
cross-widget	O
applications	O
that	O
run	O
on	O
the	O
web	O
and	O
on	O
the	O
desktop	O
.	O
</s>
