Changeset [ddb81d443f4ec0fcf773ee46a6072d1321cba06f] by Paul Davis

May 9th, 2009 @ 09:47 PM

Iteration over JavaSript objects in Python.

You can now do the 'for val in obj' syntax when obj is a wrapped JavaScript object.

Thanks Mark Lee for the patch showing how to do this for arrays.

[#10 state:resolved] http://github.com/davisp/python-...

Committed by Paul Davis

  • M THANKS
  • M spidermonkey/jsarray.c
  • M spidermonkey/jsiterator.c
  • M spidermonkey/jsiterator.h
  • M spidermonkey/jsobject.c
  • M spidermonkey/spidermonkey.c
  • M spidermonkey/spidermonkey.h
  • M tests/t.py
  • M tests/test-iterate.py
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Python/JavaScript bridge module, making use of Mozilla's spidermonkey JavaScript implementation. Allows implementation of JavaScript classes, objects and functions in Python, and evaluation and calling of JavaScript scripts and functions respectively. Borrows heavily from Claes Jacobssen's Javascript Perl module, in turn based on Mozilla's 'PerlConnect' Perl binding.