{ "info": { "author": "Luke Granger-Brown & Alessandro Molina", "author_email": "python@lukegb.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: JavaScript", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "dukpy\n=====\n\n.. image:: https://travis-ci.org/lukegb/dukpy.png?branch=master \n :target: https://travis-ci.org/lukegb/dukpy \n\n.. image:: https://coveralls.io/repos/lukegb/dukpy/badge.png?branch=master\n :target: https://coveralls.io/r/lukegb/dukpy?branch=master \n\nDukPy is a simple javascript interpreter for Python built on top of\nduktape engine **without any external dependency**.\nIt comes with a bunch of common transpilers built-in for convenience:\n\n - *CoffeeScript*\n - *BabelJS*\n - *TypeScript*\n\nDukpy has been tested on **Python 3.4**, dukpy\nis currently not production ready and might actually crash your\nprogram as it is mostly implemented in C.\n\ndukpy-lukegb is a fork of Alessandro Molina's dukpy: https://github.com/amol-/dukpy\n\nCoffeeScript Compiler\n---------------------\n\nUsing the coffeescript compiler is as easy as running::\n\n >>> import dukpy\n >>> dukpy.coffee_compile('''\n ... fill = (container, liquid = \"coffee\") ->\n ... \"Filling the #{container} with #{liquid}...\"\n ... ''')\n '(function() {\\n var fill;\\n\\n fill = function*(container, liquid) {\\n if (liquid == null) {\\n liquid = \"coffee\";\\n }\\n return \"Filling the \" + container + \" with \" + liquid + \"...\";\\n };\\n\\n}).call(this);\\n'\n\nTypeScript Transpiler\n---------------------\n\nThe TypeScript compiler can be used through the ``dukpy.typescript_compile`` function::\n\n >>> import dukpy\n >>> dukpy.typescript_compile('''\n ... class Greeter {\n ... constructor(public greeting: string) { }\n ... greet() {\n ... return \"