Run Python script from JS

G

Gnarlodious

Is there any way to call a Py script from Javascript in a webpage?

I don't have to tell you how messy JS is…

-- Gnarlie
 
C

Chris Rebert

Is there any way to call a Py script from Javascript in a webpage?

Where is the script located, and where do you want it to run? Server or client?
I don't have to tell you how messy JS is…

Indeed. jQuery dulls the pain though.

Cheers,
Chris
 
T

Tim Roberts

Hansmeet said:
for xhtml wouldnt the syntax be <script type = "text/python">??
or am i on some other planet

No, you're right. Before you get too excited, however, I want to
emphasize how limited this option is. This will ONLY work if Python has
been installed on the machine running the browser, AND if Python has
been enabled as an ActiveScripting language on that machine. The
Windows Python installations have the ability to do that, but it is not
done automatically because the security implications are not fully
understood. (Well, more precisely, there are known attack vectors that
make it too dangerous for widespread deployment.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,423
Latest member
henerygril

Latest Threads

Top