+ 1

How can I link js and python?

14th Oct 2019, 2:45 PM
sujay simha
sujay simha - avatar
11 Respuestas
+ 2
I mean inserting python code into javascripts' like <script> or <style> method in HTML
14th Oct 2019, 2:51 PM
sujay simha
sujay simha - avatar
+ 1
You can't
14th Oct 2019, 2:51 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
Aymane Boukrouh thanks for answering!
14th Oct 2019, 2:52 PM
sujay simha
sujay simha - avatar
+ 1
Iam not sure about javascript, but a turnaround would be to excute a .py file, and get the output as a variable (I only tried it with php though, you have to check if it works with javascript too, use google)
14th Oct 2019, 2:53 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
sure, I will do that
14th Oct 2019, 2:54 PM
sujay simha
sujay simha - avatar
+ 1
you can! using brython, you can use python in html!
14th Oct 2019, 10:20 PM
SpaceJunk
SpaceJunk - avatar
+ 1
it needs to be copied into the java script part(the code that helps it work) then you can do thta
14th Oct 2019, 10:20 PM
SpaceJunk
SpaceJunk - avatar
+ 1
I don't know but <script language ="python" type ="text/python" ?
15th Oct 2019, 10:57 PM
Bright Lin
Bright Lin - avatar
+ 1
I'm not sure, python is for data. Servers with all the comment stuff, there profile and other personnal stuff need python to manage the data. Maybe link with php and after with php to javascript.
15th Oct 2019, 11:02 PM
Bright Lin
Bright Lin - avatar
+ 1
thanks a lot guys!
16th Oct 2019, 6:22 AM
sujay simha
sujay simha - avatar
0
What kind of link do you mean ?
14th Oct 2019, 2:49 PM
Aymane Boukrouh
Aymane Boukrouh - avatar