I already checked in stack and nobody seems to give proper solution to trigger a python script from html page, it doesn't necessary means a hosted website just a local html file, its possible to run separate java script from html so I guess the same can be done with python
-
"it is possible to run separate JavaScript from HTML" - how? You cannot execute node on your local machine from an html pagemplungjan– mplungjan2020-09-29 12:06:20 +00:00Commented Sep 29, 2020 at 12:06
-
@Moncif Mo: Welcome! You cannot launch arbitrary scripts from an HTML document for security reasons. You would need to have your page call a Python script via a web server, for instance. For simple Python web scripting, I suggest you take a look at Flask: flask.palletsprojects.comSolarBear– SolarBear2020-09-29 12:10:05 +00:00Commented Sep 29, 2020 at 12:10
-
1@SolarBear thanks for clearing it out, I will get into itMoncif Mo– Moncif Mo2020-09-29 12:21:10 +00:00Commented Sep 29, 2020 at 12:21
-
@mplungjan I meant a local html file from your local machine running a local java script, It would be a major security breach if I found a way to do it online ;)Moncif Mo– Moncif Mo2020-09-29 12:24:07 +00:00Commented Sep 29, 2020 at 12:24
-
A local file from a local machine cannot run a JS file other than in the scope of the HTML file. You want to run something your normally would run from the terminal/commandline and you cannot di that without some help from example WSH on windowsmplungjan– mplungjan2020-09-29 12:26:24 +00:00Commented Sep 29, 2020 at 12:26
Add a comment
|