Reputation: 1230
I've searched high and low for a solution to this and I've also gone through How to execute Javascript from Python on Windows? but it was asked a while ago. In the meantime has the world come up with a better solution? And no python-spidermonkey does not work for windows. Anyone successful in having embedded javascript into python?
Alternatively,if developed using some available libraries like python-spidermonkey on Linux ,is there a way in which the end product could be made to run on Windows?
EDIT:Have also been to Pydermonkey but stop short in the build process with the following error
---> pavement.build
---> pavement.build_spidermonkey
Running configure.
Captured Task Output:
---------------------
---> pavement.build
---> pavement.build_spidermonkey
Traceback (most recent call last):
File "F:\Ashwin\Sutta-app\Embedding python\python-spidermonkey-0.0.10\pydermonkey0.0.6\python-modules\paver\tasks.py", line 164, in _run_task
return do_task()
File "F:\Ashwin\Sutta-app\Embedding python\python-spidermonkey-0.0.10\pydermonkey-0.0.6\python-modules\paver\tasks.py", line 160, in do_task
task()
File "F:\Ashwin\Sutta-app\Embedding python\python-spidermonkey-0.0.10\pydermonkey-0.0.6\python-modules\paver\tasks.py", line 241, in __call__
retval = environment._run_task(self.name, self.needs, self.func)
File "F:\Ashwin\Sutta-app\Embedding python\python-spidermonkey-0.0.10\pydermonkey-0.0.6\python-modules\paver\tasks.py", line 181, in _run_task
return do_task()
File "F:\Ashwin\Sutta-app\Embedding python\python-spidermonkey-0.0.10\pydermonkey-0.0.6\python-modules\paver\tasks.py", line 161, in do_task
return func(**kw)
File "F:\Ashwin\Sutta-app\Embedding python\python-spidermonkey-0.0.10\pydermonkey-0.0.6\setup.py", line 168, in build_spidermonkey
popen = subprocess.Popen([os.environ['SHELL'], '-c', 'pwd'],
File "C:\Python27\lib\os.py", line 423, in __getitem__
return self.data[key.upper()]
KeyError: 'SHELL'
Cheers !
Upvotes: 2
Views: 898