javascript execution from Python script

Justin Guerin jguerin at cso.atmel.com
Mon Aug 26 13:19:24 EDT 2002


Hello everyone,
	Does anyone know if there is a way to execute javascript from within a Python 
script?  I'm trying to write a script to browse a web site that makes use of 
javascript rather liberally.
	I checked http://www.python.org/doc/essays/comparisons.html, where Guido 
wrote that "a Python implementation written in Java is under development, 
which allows calling Python code from Java and vice versa."  If he's 
referring to Jython, then maybe I need to check the Jython web site more 
carefully, but from what I saw, it allows you to run Python code from within 
Java, but not Java code from within Python.  And actually, since I'm more 
interested in javascript, I'm not sure it matters, anyway.  (I'm afraid I'm 
quite unfamiliar with Java and javascript.)
	Google hasn't helped me thus far, but maybe I've got the wrong search terms.  
"javascript execution python" doesn't seem to get me what I'm looking for.
	Alternately, is there a library to parse javascript into statements that can 
be exec()'d in Python?  That would probably be good enough.
	Any help / pointers are greatly appreciated.  Thanks in advance!
Justin Guerin





More information about the Python-list mailing list