+ 2

Python help required ! Display and interface.

I'm programming with Python on my desktop, progs dealing with big databases. I thought I could take some user input for tuning the algorithm, and then produce nice output by using html-css, linking my python script. This needs to use a server (if I understood well) and something like Django. But I would really like to work locally, with no server. Does one of you (at least) have the perfect, nice-efficient-easy way to do it ? Thank you !

1st Nov 2017, 11:00 PM
Cépagrave
Cépagrave - avatar
1 Odpowiedź
+ 1
This is how smoothly we can be able to run a server locally http://flask.pocoo.org/docs/0.12/quickstart/ now let's look around the problems also running on locally The problem with testing local files Some examples won't run if you open them as local files. This can be due to a variety of reasons, the most likely being: They feature asynchronous requests. Some browsers (including Chrome) will not run async requests (see Fetching data from the server) if you just run the example from a local file. This is because of security restrictions (for more on web security, read Website security). They feature a server-side language. Server-side languages (such as PHP or Python) require a special server to interpret the code and deliver the results. To get around the problem of async requests, we need to test such examples by running them through a local web server. One of the easiest ways to do this for our purposes is to use Python's SimpleHTTPServer module. Description is on web you can check it.
2nd Nov 2017, 7:09 AM
Vipul Walia
Vipul Walia - avatar