Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31606

Re: python scripts for web

References <98b7e362-14fd-4721-84c8-ae1bc11febac@googlegroups.com> <CANaSqUeAJv3u4EqBymifyKZHey1YohU=O73niTpzYOvZgSV3TQ@mail.gmail.com>
From Zero Piraeus <schesis@gmail.com>
Date 2012-10-18 03:57 -0400
Subject Re: python scripts for web
Newsgroups comp.lang.python
Message-ID <mailman.2409.1350547078.27098.python-list@python.org> (permalink)

Show all headers | View raw


:

On 18 October 2012 03:18,  <chip9munk@gmail.com> wrote:
> Here is what I need to do: on some webpage (done in php, or any other
> different technology), user inputs some data, that data and the
> request then goes to the server where python scripts calculate
> something and return the result to the users end.
>
> Now, how do I do that server part, listening to requests, and calling
> python scripts?

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.

> I googled about that but I do not understand if I should do that by
> CGI, Flask, mod_wsgi, or any other way... I know to little about that
> to understand what is the way to go. :/

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.

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.

 -[]z.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

python scripts for web chip9munk@gmail.com - 2012-10-18 00:18 -0700
  Re: python scripts for web Zero Piraeus <schesis@gmail.com> - 2012-10-18 03:57 -0400
    Re: python scripts for web chip9munk@gmail.com - 2012-10-18 01:10 -0700
      Re: python scripts for web Zero Piraeus <schesis@gmail.com> - 2012-10-18 04:42 -0400
        Re: python scripts for web chip9munk@gmail.com - 2012-10-18 02:22 -0700
          Re: python scripts for web Zero Piraeus <schesis@gmail.com> - 2012-10-18 06:02 -0400
            Re: python scripts for web rurpy@yahoo.com - 2012-10-18 08:14 -0700
            Re: python scripts for web chip9munk@gmail.com - 2012-10-18 09:01 -0700
          Re: python scripts for web Chris Angelico <rosuav@gmail.com> - 2012-10-18 21:02 +1100
            Re: python scripts for web chip9munk@gmail.com - 2012-10-18 09:03 -0700
              Re: python scripts for web Zero Piraeus <schesis@gmail.com> - 2012-10-18 17:09 -0400
                Re: python scripts for web chip9munk@gmail.com - 2012-10-18 23:05 -0700
                Re: python scripts for web Gilles <nospam@nospam.com> - 2012-10-19 12:32 +0200
                Re: python scripts for web chip9munk@gmail.com - 2012-10-23 02:17 -0700
        Re: python scripts for web chip9munk@gmail.com - 2012-10-18 02:22 -0700
    Re: python scripts for web chip9munk@gmail.com - 2012-10-18 01:10 -0700
  Re: python scripts for web chip9munk@gmail.com - 2012-10-18 09:07 -0700

csiph-web