Ryan, I should clarify that what I'd like to do here is unrelated to
the web. I'm actually just interested in using a local html page as a
simple gui to launch python calls. So a JS event handler, say a button
click, would then call a JS function which inside of it would call a
Python function while handing it arguments (say a path that the JS
queried from a field in the html page.) That kind of thing. It seems
like it should be possible, and hopefully easy, but I have no
experience in calling Python functions from other languages so I'm just
looking for some input on that. Thanks,
-MH
On Mar 25, 2005, at 12:01 PM, Ryan Davis wrote:
Depends on your environment.
If your js is on a webpage, you can have it make http calls to a
python web service. Look for articles on XMLHttpRequest in
javascript to see some examples.
I don't know how else that could be done, but I imagine there are
other ways.
Thanks,
Ryan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Hall
Sent: Friday, March 25, 2005 2:18 PM
To: tutor@python.org
Subject: [Tutor] Python and Javascript
I'm curious on whether or not JavaScript and Python can talk to each
other. Specifically, can a python function be called from within a JS
function? Admittedly this is probably more of a JavaScript than Python
question, but I'd love to know if anyone can at least point me in a
direction to research this.
-MH
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor