Calling Python from Javascript?

7stud bbxx789_05ss at yahoo.com
Wed Apr 11 04:18:19 EDT 2007


On Apr 11, 1:50 am, Kenneth McDonald
<kenneth.m.mcdon... at sbcglobal.net> wrote:
> I know that there's some work out there to let Python make use of
> Javascript (Spidermonkey) via (I assume) some sort of bridging C/C++
> code. Anyone know of efforts to allow the reverse? I'd really like to
> make use of Python when doing Mozilla DOM programming, and I can never
> get a clear idea of when PyXPCOM might be available to those of us who
> don't know the ins and outs of compiling Mozilla, and its XPCOM
> structures. So if there was an easy way to simply and quickly pass even
> just strings back and forth between Python and Moz Javascript, that
> would make certain things a heck of a lot easier.
>
> Thanks,
> Ken

Javascript can make requests to the server, and far as I know python
can be used with either cgi or apache to respond to server requests.
Therefore, javascript can easily pass strings to a server side python
script, and it can easily handle data sent back that is formatted as a
string, XML, or JSON. I'm not sure what PyXPCOM is or why it's
relevant.




More information about the Python-list mailing list