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


Groups > comp.lang.python > #100908

CGI

Path csiph.com!goblin3!goblin.stu.neva.ru!news.tu-darmstadt.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Pol Hallen <pythonml@fuckaround.org>
Newsgroups comp.lang.python
Subject CGI
Date Sat, 26 Dec 2015 10:41:51 +0100
Lines 24
Message-ID <mailman.31.1451231525.11925.python-list@python.org> (permalink)
Reply-To polhallen@fuckaround.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de vbfGThlDOoF30cQU/Fny1gnyEFaFZGf27I1PCPdPU1FA==
Return-Path <pythonml@fuckaround.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.178
X-Spam-Level *
X-Spam-Evidence '*H*': 0.66; '*S*': 0.02; 'url:localhost': 0.09; 'python': 0.10; ':-)': 0.12; 'output': 0.13; ':-/': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'url:py': 0.16; 'language': 0.19; '(like': 0.23; 'script': 0.25; 'header:User- Agent:1': 0.26; 'command': 0.26; 'skip:# 10': 0.27; 'cgi': 0.29; 'question:': 0.29; 'print': 0.30; 'help!': 0.30; 'to:name:python- list': 0.30; "i'd": 0.31; 'utility': 0.33; 'something': 0.35; 'to:addr:python-list': 0.36; 'received:10': 0.37; 'thanks': 0.37; 'received:org': 0.37; "didn't": 0.39; 'enough': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'received:85': 0.60; 'show': 0.62; 'christmas': 0.66; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'received:10.10': 0.76; 'merry': 0.84; 'pol': 0.84; 'received:10.10.10': 0.84; 'received:85.18': 0.84; 'received:fastwebnet.it': 0.84; 'similar)': 0.84; 'received:2': 0.93
X-Spam-Checker-Version SpamAssassin 3.3.2 (2011-06-06) on server1.fuckaround.org
X-Spam-Level
X-Spam-Status No, score=-2.9 required=7.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2
User-Agent Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.4.0
X-Virus-Scanned clamav-milter 0.98.4 at server1.fuckaround.org
X-Virus-Status Clean
X-Mailman-Approved-At Sun, 27 Dec 2015 10:52:03 -0500
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:100908

Show key headers only | View raw


Merry Christmas to all :-)

A (newbie) question: I'd like learn about CGI pyhton script to create 
some utility using http://localhost/python_script01.py

Something like that:

#!/usr/bin/python
print "Content-type: text/html"
print
print "<html>"
print "<center>Hello!</center>"
print "</html>"

How can I execute a local command (like ls or similar) and show output 
via browser?

I didn't find enough documentation to work with python and CGI :-/

Is python not good language to use it with CGI?

Thanks for help! :)

Pol

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


Thread

CGI Pol Hallen <pythonml@fuckaround.org> - 2015-12-26 10:41 +0100
  Re: CGI Maitu Zentz <zen@nonirvana.org> - 2015-12-27 17:19 +0100
  Re: CGI Laurent Delacroix <laurent@krutt.org> - 2015-12-27 18:59 +0100
    Re: CGI Chris Warrick <kwpolska@gmail.com> - 2015-12-27 21:01 +0100

csiph-web