Python to JavaScript translator
Python JavaScript Shell
Pull request Compare This branch is 89 commits ahead, 355 commits behind chrivers:ist/compiler.
Latest commit 066895a Mar 18, 2012 Dusty Phillips improved usage instructions using a code block.


Python to JavaScript translator.




Execute the following:

git clone
cd pyjaco


firefox examples/gol.html

And the game of life should show in the browser. If it doesn't, it's a bug. You can generate that file using

python examples/ > examples/gol.html



Will run all tests, that are supposed to work. If any test fails, it's a bug.

./ foo

Will run all tests with "foo" in the name. Very useful for running a group of tests.

./ -a

Will run all tests including those that are known to fail (currently). It should be understandable from the output.

./ -x or ./ --no-error

Will run tests but ignore if an error is raised by the test. This is not affecting the error generated by the test files in the tests directory.

For more flags then described here

./ -h

Single test cases

With the "casetest" script you can keep comparing the output of pyjaco to the output of python on the same python script. It's very useful if you are debugging the compiler or standard library.


Will run through python and pyjaco, and display the differences. It will then display a line of "#", and wait for you to press enter to do another iteration. When the files match, casetest will exit.


From source code:

import sys
    from pyjaco import Compiler
    code = open("", "r")
    compiler = Compiler()
    print str(compiler)

Using the script:

./ --output filename.js --watch


Free Software. See the LICENSE file for exact details.