Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting a python script to a web application [closed]

Tags:

python

I have a python script written up and the output of this script is a list . Right now I need to get it online and make it accesible to others. I looked at Django , but then I realised that it may be kind of hard to create the UI. Is there any simple way to create a UI in Django and map it to an existing python script. Right now I am not using sql and things like that. Or is there a simpler way by which I can proceed?

like image 993
user2578666 Avatar asked Sep 11 '13 00:09

user2578666


People also ask

Can you turn a Python script into an executable?

Pyinstaller tutorialPyinstaller allows you to quickly convert a Python file to an executable file from your terminal.

How do I keep a Python script open after running?

cmd /k is the typical way to open any console application (not only Python) with a console window that will remain after the application closes. The easiest way I can think to do that, is to press Win+R, type cmd /k and then drag&drop the script you want to the Run dialog. Fantastic answer.

What happens if you change a Python file while it's running?

The program is loaded into your main memory. If you change the source file, nothing happens.


1 Answers

I'd go with Flask or web.py.

Django pays off if you develop a large app; yours is not.

Probably all you need is two pages: one with an input form, and another with results. As long as your input is text, you should have little trouble taking input from a POST handler and passing it as is to your script.

Both microframeworks have tutorials: here's web.py's, and Flask's is right on the home page. Should get you started very quickly.

like image 80
9000 Avatar answered Oct 13 '22 14:10

9000