execution python application from browser

I have written a python console based program. It takes few arguments (like file name ) for execution. I want to run it from the browser... How can I parse this arguments and execute that python code Any clues..approaches. Thanks


Maybe you should clarify your problem. At least i don't fully understand why you want to run a terminal program in the browser?

But if you want to reuse some code you have already written you could use a micro framework like Flask.

Check this example from flask's docs:

from flask import Flask
app = Flask(__name__)

def hello():
    return "Hello World!"

if __name__ == "__main__":

So you could write a simple view that accepts the arguments you need and the view would then call your code and return whatever you want, most likely an http response.

Need Your Help

ng-token-auth ui-router resolver causes blank screen

javascript ruby-on-rails angularjs

I am following the docs for ng-token-auth here trying to add a resolver for auth, which calls validateUser. When I add this block of code from the documentation I render a blank screen. I get no ...

Updating an “order” column MySQL?

sql mysql

What's the best way to update an "order" column?