Saturday, 15 May 2010

python - how to run simple script via web instead of a executable file -


I am trying to use a python without any ordinary program.

Some errors are taking place while doing this

Still, I was thinking that it would upload the program anywhere on the Web, hence, anyone with the link can use it in a very easy and practical way .

Does anyone know how I can accomplish this?

  1. If you want to download someone, use your file command :

      Python -M SimpleHTTserver  

    on your file diary.

  2. If you want to execute something in Python script, use a small web service flask:

  3. Flask app = flask from flask import (__name__ ) @Apps Root ('/') Def hello_world (): # Return your dragon script to 'Hello World' here! If __name__ == '__main__': app.run ()

    Anyone else can use your script {yourIp}: 8000 with browser.

Except the code, you only need to use a server and a browser.


No comments:

Post a Comment