The pyjs repositories are hosted on Github. For read-only access to pyjs' main repository use the following:
git clone https://github.com/pyjs/pyjs.git
If you want to add contributions to the project source code see Contribute for details.
Web application development can be tricky: it can come as a bit of a shock when compared to Python app development to learn that web browsers do not come with any proper debugging assistance whatsoever, by default. You will need to install and/or enable a debugger in the browsers that you use:
For debug output using pyjs' logging module is recommended (see below for details).
You should also note that the pyjs compiler has a -d option which will enable a Python-like stack trace when a JavaScript exception occurs. The amount of JavaScript generated can be FIVE times larger, so only enable this during development.
Lastly, it is worth reiterating that pyjs Desktop runs as pure Python: you should give serious consideration to running the application under pyjs Desktop alongside developing it for the browser. The availability of Python runtime stack traces and the simple fact that the standard Python interpreter is much better at catching certain kinds of errors than (brain-damaged) browsers has generally found to make life much much easier.
With pyjs you can use full Python-style logging (Python's flexible event logging module has been ported to pyjs). Additional handlers allow you to display log messages in a dedicated div element in the HTML document, in the Web browser's error console, and with JavaScript's alert() function.
from pyjamas import logging log = logging.getConsoleLogger() # other loggers: Alert, Append, Print ... ... log.error("Hello, here is an %s error", err_name)
For a good understanding of the logging module read the Python Logging HOWTO; most of it directly applies to pyjs. Additional loggers provided by pyjs, and how you'd use them:
pyjsbuild command line switch -d, --enable-debug generates a vast amount of extra information for every single line of code in JavaScript. This blows up your code size drastically, use it as the last resort.
To become familiar with the user interface side of pyjs, you might like to refer to the examples online and also compile and run them locally.
You might find the ui module class hierarchy useful. The ui module contains all of the main classes you need to create your user interface. At first, this module can be a quite confusing because of the number of classes defined. However, there is API documentation, along with a tutorial on how to create your own interactive widget.
You might also have a look at the GWT Documentation for widgets that have been ported to pyjs.
The pyjs repo contains both shared libraries (usable in Python or JavaScript mode), and "runners" that execute the code (Python or JavaScript) on a particular engine. Here is a quick what-is-what.
Key points to remember: