tbodt / v8py

Write Python APIs, then call them from JavaScript using the V8 engine.
GNU Lesser General Public License v3.0
443 stars 29 forks source link

can't export buildin function? #44

Open RonaldinhoL opened 3 years ago

RonaldinhoL commented 3 years ago
>>> ctx.expose(print)
>>> ctx.eval('print')
<built-in function print>
>>> ctx.eval('print()')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
v8py.JSException: TypeError: print is not a function
>>> ctx.eval('typeof print')
'object'