They are Python libraries that I developped on 2011.
- PyExecJS: Automatically picks the best runtime available to evaluate your JavaScript program.
- Python-CoffeeScript: A bridge to the JS CoffeeScript compiler.
They are ports of ruby gems with same name (execjs and ruby-coffee-script).
The aim of them were to compile CoffeeScript code on Windows XP. It was difficult and tangled to install Ruby, NodeJS or V8 (at least, I thought so). What I could use were builtin JScript and Python (which is installed with installer).
EOL. PyExecJS and Python-CoffeeScript are no longer maintananced. Bugs are not be fixed (even if they are trivial or essential).
We suggest to use other library or to make a fork.
Currently, NodeJS works on Windows 10.
- To execute JavaScript snippet, We can use
subprocess.check_output(['node', ...])
. - To compile CoffeeScript code, we can use build tool such as WebPacker.
So, I think that PyExecJS and Python-CoffeeScript are useless (for my original purpose).
It seems for me that PyExecJS is mainly used as a bridge to NodeJS.
However, As a bridge to NodeJS, PyExecJS is badly designed.
It is because I designed (cloned) PyExecJS as a adapter to cover-up difference of JS engines (NodeJS, PyV8, JScript, etc..).
So, PyExecJS does not support NodeJS specific features (such as to specify NODE_ENV
). It is difficult to add features while keeping consistency with original design.
If we want to call NodeJS function from Python, I think we should use raw subprocess.check_output
or an single purpose library.
Thanks for using PyExecJS and Python-CoffeeScript, for sending merge requests and issues.
Respect!
New successor:exejs