python scripts for web

chip9munk at gmail.com chip9munk at gmail.com
Thu Oct 18 04:10:50 EDT 2012


To explain, I am basically doing different algorithms and would like to make them work and be accessible as I mentioned in the example... and to add them to the functionality of a specific page... so I have experience in programming, just no experience in web development etc.. 

On Thursday, October 18, 2012 9:57:58 AM UTC+2, Zero Piraeus wrote:
> 
> If I understand you correctly, what you're describing here is a
> webserver - i.e. Apache, nginx etc. I'm not sure why you'd want to
> write one of those if you're as inexperienced as you say.
> These are all approaches to writing the software that the webserver
> hands the request off to, which is a different thing. If that's what
> you really meant to ask (how to write a script that processes a
> request and returns a response), then plain CGI might be the best
> place to start, if you're trying to get a handle on what's going on.

I understand how the lack of knowledge on my part can cause the unclarity of my question.
I will give you an example. So let us say I create two simple python scripts, one does the sum of two numbers
the other one does the multiplication. SO now I want to put these scripts on the server. Now let us say there is a web page that would like to use these scripts (do this calculation). How do I do a "program" that will listen for the requests
from the web page and call the scripts on the request?  
 
> Once you're happy that you understand how to build a plain CGI script,
> frameworks [like Flask] can be very useful ... and Flask is both
> lightweight and has good documentation, so it's not a bad choice for
> learning purposes.

all the tutorials about flask are dealing wit creating the whole webpage in python. I do not need to do that, I just need a service on the servers end.. is flask still the way to go? Also flask does not support Python 3.x jet, would using cherryPy be a good idea?

Thank you for the answers! 




More information about the Python-list mailing list