Skip to content
This repository

Pyjs canonical sources. Start here!

branch: master

Merge pull request #820 from atupal/patch-1

typo: "java script" -> "javascript"
latest commit 1168b839d7
Lex Berezhny eukreign authored
Octocat-spinner-32 doc recover bookreader image; update link June 23, 2012
Octocat-spinner-32 examples Fixed examples util for new directory layout. Probably not for windows. February 07, 2014
Octocat-spinner-32 pgen This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 pygtkweb find * -name '*.py' | xargs sed -i -r 's,\s+$,,' May 14, 2012
Octocat-spinner-32 pyjd This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 pyjs NameError: name 'StandardError' is not defined March 19, 2014
Octocat-spinner-32 pyjswaddons This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 pyjswidgets This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 tests Create __init__.py file March 18, 2014
Octocat-spinner-32 .gitignore This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 .travis.yml one last try to fix travis ci integration October 30, 2013
Octocat-spinner-32 CHANGELOG prepare for 0.9 release... FIXME: `mv CHANGELOG{,.rst}` April 14, 2013
Octocat-spinner-32 CREDITS This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 DEVELOPER.RULES rules: some initial changes ... this file should be dropped really August 22, 2012
Octocat-spinner-32 INSTALL.txt Added creation of bin/pyjd[.bat] and fixes for win32 May 04, 2011
Octocat-spinner-32 LICENSE added license file May 06, 2012
Octocat-spinner-32 Makefile prepare for 0.9 release... FIXME: `mv CHANGELOG{,.rst}` April 14, 2013
Octocat-spinner-32 README.pysm This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 README.pyv8 This is a consolidated diff of all directory restructuring October 25, 2013
Octocat-spinner-32 README.rst typo: "java script" -> "javascript" March 20, 2014
Octocat-spinner-32 copyright update copyright information July 29, 2012
Octocat-spinner-32 requirements.txt Add closure compiler jar into the code base to make its use simple. October 30, 2013
Octocat-spinner-32 setup.py Update setup.py March 18, 2014
Octocat-spinner-32 setup_pyjstools.py Add closure compiler jar into the code base to make its use simple. October 30, 2013
Octocat-spinner-32 setup_pyjswidgets.py This is a consolidated diff of all directory restructuring October 25, 2013
README.rst
Build Status

Pyjs

Pyjs 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. Pyjs 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).

Pyjs also contains a Desktop Widget Set version, running as pure python, with three useable Desktop ports available. With web-engine technology at it's core, HTML, CSS, plugins and other related features work out-of-the-box.

For more information and documentation, see:

For issue tracking:

Mailing list:

IRC:

Server: irc.freenode.net
Channel: #pyjs

Pyjs-Compiler

Pyjs-Compiler tools are a collection of tools that related to
  • compiling python code to javascript
  • linking compiled javascript modules into complete application
  • to convert java to python, etc.

Pyjs-Compiler runs your python application in a Web Browser (as javascript).

Pyjs-Widgets

Pyjs-Widgets are a collection of GUI widget libraris that can be run natively as part of Pyjs-Native or compiled by Pyjs-Compiler to run in a browser.

Pyjs-Desktop

Pyjs runs your python application in a Web Browser (as javascript). Pyjs-Desktop runs exactly the same python application on the Desktop (as pure python). There are currently three engine choices, with alternatives in development.

All ports of Pyjs-Desktop require a JSON library: simplejson is recommended if the version of python is 2.5 or less. Python 2.6 and above come with a json library installed by default.

  1. XULRunner

    Install hulahop and python-xpcom. Hulahop, from OLPC SugarLabs, 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.

    Older versions of XULRunner must be used: versions 1.9.0 or 1.9.1 are known to be suitable, as is version 9.0. Versions 10 and above are known to segfault.

  2. GIWebKit (GObject Introspection)

    A 95% functional binding enabled via the dynamic GObject/Python bindings produced by https://wiki.gnome.org/GObjectIntrospection after scanning the annotated WebKit sources. This backend is missing a critical piece, window.addEventListener, from https://bugs.webkit.org/show_bug.cgi?id=77835 but development is in progress to implement the missing binding via ctypes instead, due to a lack of interest by WebKit.

    This is intended to supercede XULRunner as the default on Linux once ready.

    GIWebKit must be explicitly enabled. create a $HOME/.pyjd/pyjdrc file containing the following two lines:

    [gui] engine=giwebkit

  3. MSHTML

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

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

    Unlike the other ports, which can comprise a whopping great bundle of anything up to 30mb in size, the MSHTML port literally requires nothing more than comtypes, thanks to the far-sighted design of the MSHTML Trident Engine and its extensive COM interface.

Installation Dependencies

  1. python
  2. virtualenv - a python toolset that allows multiple python sandox installations
  3. pip - an alternative to the standard python installation tools

Installation

  1. Download and unzip/untar the pyjs.tar.gz file

  2. Change into the pyjs root directory

    cd <pyjsroot>

  3. Optional step to create your own virtual python sandbox for development purposes virtualenv mypython

This will create a mypython directory and install sandboxed virtual python installation at
<pyjsroot>/mypython
  1. Install Pyjs-Tools, Pyjs-Pyjamas and all dependencies

    <pyjsroot>/mypython/bin/pip install <pyjsroot>

    OR the following if you want to develop and modify Pyjs-Compiler or Pyjs-Widgets themselves

    <pyjsroot>/mypython/bin/pip install -e <pyjsroot>

You are now ready to use Pyjs. Scripts for compiling python code to Javascript as well as compiling applications will be installed into the mypython sandbox

<pyjsroot>/mypython/bin/pyjscompile <pyjsroot>/mypython/bin/pyjsbuild <pyjsroot>/mypython/bin/pyjampiler
Something went wrong with that request. Please try again.