0

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

5
  • "it is possible to run separate JavaScript from HTML" - how? You cannot execute node on your local machine from an html page Commented 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.com Commented Sep 29, 2020 at 12:10
  • 1
    @SolarBear thanks for clearing it out, I will get into it Commented 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 ;) Commented 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 windows Commented Sep 29, 2020 at 12:26

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.