Python CGI Scripting Documentation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vlad Dogaru

    #1

    Python CGI Scripting Documentation

    Hello,

    I would like to learn web scripting with Python (sure, everyone uses
    PHP, but I don't like the syntax and Python is more general-purpose
    and... well, I guess you people know the advantages better than me).
    Where can I get a thorough introduction to both CGI and using Python
    for CGI? That includes installing my own web server (at home, for
    testing) and starting from scratch (by that I mean I have near null
    experience with CGI).

    I have tried looking through the source code of MoinMoin, but it's just
    too advanced for me -- I simply don't know where to start. Right now,
    I'll take any and all suggestions. However, please suggest books or
    articles that are up-to-date on Python programming; I'd hate to see
    that I'm studying obsolete texts or the like.

    Thanks in advance,
    Vlad

    --
    If I make any mistake, be it regarding English or Usenet, do point it
    out to me. Thank you.

  • Michael

    #2
    Re: Python CGI Scripting Documentation

    Sybren Stuvel wrote:
    Why use CGI when you can use a framework that's so much easier and
    more powerful?
    Lots of possible answers, a few:
    * Fun
    * Transferable skills
    * No single solution is ever the answer to all problems
    (not all problems are nails, not all solutions are hammers)
    * Someone needs to understand the nuts and bolts of what's going on
    * Just because something is difficult doesn't mean its not worth doing
    * Understanding what's actually going on

    But the killer answer for me really is: "Why not" :-)

    Have fun :-)


    Michael.

    Comment

    • per9000

      #3
      Re: Python CGI Scripting Documentation

      Hi,

      I wanted to try this myself a few days ago, my first (working) try had
      this source code:

      ---
      #!/usr/bin/python

      print 'Content-Type: text/plain'
      print
      print 'hell o world'
      ---
      (the output is just "hell o world\n", but the first four lines are
      still required I guess, I don't know why, but it works...)

      The file had to be named filetitle + ".cgi" because of some setting at
      my web hotel.

      Good luck!

      /Per9000

      Comment

      Working...