1

I have following piece of code.

import PyV8

class Global(PyV8.JSClass):
     def __init__(self):
        pass

out = []
with PyV8.JSContext(Global()) as ctxt:
    ctxt.enter()
    op = ctxt.eval("function as(){return {'error':['ssda','sadsadds'], 'warning':[],'score':1};} as();")
    print(op['error'])

I am getting Segmentation fault while running above code with python 3.4.3 while it is working fine with python2.6.
Here is the snapshot.

enter image description here

(pyv8Pyvhon34)[root@ip- pyToJs]# python --version
Python 3.4.3
(pyv8Pyvhon34)[root@ip- pyToJs]# python pyv8Testing.py
ssda,sadsadds
Segmentation fault
(pyv8Pyvhon34)[root@ip- pyToJs]# deactivate
[root@ip- pyToJs]# python --version
Python 2.6.6
[root@ip- pyToJs]# python pyv8Testing.py
ssda,sadsadds

I am using version 1.0.dev0 of PyV8

Prashant Gaur
  • 9,540
  • 10
  • 49
  • 71
Ashisha Nautiyal
  • 1,389
  • 2
  • 19
  • 39

0 Answers0