
    OJni                        d Z ddlmZmZmZ ddlmZmZmZm	Z	 ddl
ZddlmZ ddlmZ dj!                         Zej$                  j&                  Zej$                  j(                  Zej$                  j*                  Zej$                  j,                  ZddZej.                  j                   e_         dd	Zej0                  j                   e_         dd
Zej2                  j                   e_         y)a  r
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
    )unicode_literalsdivisionwith_statement)ErrorRuntimeErrorProgramErrorRuntimeUnavailableErrorN)ExternalRuntime)AbstractRuntimez
    get register runtimes get_from_environment exec_ eval compile
    ExternalRuntime
    Error RuntimeError ProgramError RuntimeUnavailableError
c                 6    t               j                  | |      S N)getevalsourcecwds     @/home/uftp/myenv/lib/python3.12/site-packages/execjs/__init__.pyr   r   2   s    5::fc""    c                 6    t               j                  | |      S r   )r   exec_r   s     r   r   r   7   s    5;;vs##r   c                 6    t               j                  | |      S r   )r   compiler   s     r   r   r   <   s    5==%%r   r   )__doc__
__future__r   r   r   execjs._exceptionsr   r   r   r	   execjs._runtimesexecjsexecjs._external_runtimer
   execjs._abstract_runtimer   split__all__	_runtimesregisterr   runtimesget_from_environmentr   r   r    r   r   <module>r'      s   ( B A   4 4 
EG	  $$$$''<< ###++$%%--&!))11r   