Metadata-Version: 1.1
Name: PyExecJS
Version: 1.0.5
Summary: Run JavaScript code from Python
Home-page: https://github.com/doloopwhile/PyExecJS
Author: Omoto Kenji
Author-email: doloopwhile@gmail.com
License: MIT License
Description: PyExecJS
        ========
        
        Run JavaScript code from Python.
        
        PyExecJS is a porting of ExecJS from Ruby. PyExecJS automatically picks
        the best runtime available to evaluate your JavaScript program, then
        returns the result to you as a Python object.
        
        A short example:
        
        ::
        
            >>> import execjs
            >>> execjs.eval("'red yellow blue'.split(' ')")
            ['red', 'yellow', 'blue']
            >>> ctx = execjs.compile("""
            ...     function add(x, y) {
            ...         return x + y;
            ...     }
            ... """)
            >>> ctx.call("add", 1, 2)
            3
        
        Of course, you can pick particular JavaScript runtime by get() function:
        
        ::
        
            >>> default = execjs.get() # the automatically picked runtime
            >>> default.eval("1 + 2")
            3
            >>> jscript = execjs.get("JScript")
            >>> jscript.eval("1 + 2")
            3
            >>> node = execjs.get("Node")
            >>> node.eval("1 + 2")
            3
        
        If EXECJS\_RUNTIME environment variable is specified, PyExecJS pick the
        JavaScript runtime as a default:
        
        ::
        
            >>> #execjs.get().name # this value is depends on your environment.
            >>> os.environ["EXECJS_RUNTIME"] = "Node"
            >>> execjs.get().name
            'Node.js (V8)'
        
        PyExecJS supports these runtimes:
        
        -  `PyV8 <http://code.google.com/p/pyv8/>`__ - A python wrapper for
           Google V8 engine,
        -  `Node.js <http://nodejs.org/>`__
        -  Apple JavaScriptCore - Included with Mac OS X
        -  `Mozilla SpiderMonkey <http://www.mozilla.org/js/spidermonkey/>`__
        -  `Microsoft Windows Script
           Host <http://msdn.microsoft.com/en-us/library/9bbdkx3k.aspx>`__
           (JScript)
        
        Installation
        ============
        
        ::
        
            $ pip install PyExecJS
        
        or
        
        ::
        
            $ easy_install PyExecJS
        
        License
        =======
        
        Copyright (c) 2012 Omoto Kenji. Copyright (c) 2011 Sam Stephenson and
        Josh Peek.
        
        Released under the MIT license. See ``LICENSE`` for details.
        
        Changes
        =======
        
        1.0.5
        -----
        
        -  Supported Python 3.3
        -  Fixed file handle leaking
        -  Fixed issue with passenger-nginx-4.0
        
        1.0.4
        -----
        
        -  Removed "import execjs" (it prevent execution of setup.py by Python
           2.6)
        
        1.0.3
        -----
        
        -  Javascript sources were embeded in **init**.py. 'which' command were
           reimplemented by pure python.
        
        1.0.2
        -----
        
        -  Python 2.6.x was supported.
        
        1.0.1
        -----
        
        -  Forgotten shell=True was added to Popen.
        
        1.0.0
        -----
        
        -  First release.
        
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: JavaScript
