Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Pol Hallen Newsgroups: comp.lang.python Subject: CGI Date: Fri, 25 Dec 2015 21:35:11 +0100 Lines: 24 Message-ID: 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 9yGCFgpur7vLPlFNn+3ZuAfuQ8QVA4kzIQj0yZRjJ+Ug== Return-Path: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100907 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 "" print "
Hello!
" print "" 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