Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.051 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:script': 0.09; 'python': 0.11; 'suggest': 0.14; 'template': 0.14; 'linux).': 0.16; 'throw': 0.16; 'wsgi.': 0.16; 'subject:python': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'thu,': 0.19; 'please?': 0.24; 'script': 0.25; 'query': 0.26; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'cgi': 0.31; 'coded': 0.31; 'me?': 0.32; 'run': 0.32; 'url:python': 0.33; 'could': 0.34; 'subject:with': 0.35; 'test': 0.35; 'received:google.com': 0.35; 'much.': 0.36; 'url:org': 0.36; 'starting': 0.37; 'remote': 0.38; 'server': 0.38; 'thank': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'how': 0.40; 'station': 0.60; 'here:': 0.62; 'our': 0.64; 'dear': 0.65; 'laptop': 0.65; 'regards.': 0.65; '26,': 0.68; '(web': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=NdovmyGxXHY3aPVdawwd3IakDi0fvEUanuZ37fhsbkI=; b=kho1lyxRbkd0bc0qkA7B0E6feP177of5zjsodX8pLesQdfkH4etgXkc4QUvdQ4YjxA pPTAo8t0rLgoYKUo9tszvprW1TGONefCdCVsM4Sx3poVuyJESlAEYCn5/XCoMaoyO993 5XRxBvGRKdQEmlMiP2wCo8d4+/AOGj+1wAbG6faXb50Anso6Om5tcG4eKVWPGA4ycFCf kDQWy4+nxN8HevAbgz8/AiSfNrSQeyrBW1TPNyqQyPTu3AW4GaByOYxtFf7nIbz8rsTc 3gaYGw28pQV3XnhtcKJ5GPzX4lX7zHF/AcXCnjbnv2NK/6ow+IS3xglGyqcS4ytfKG03 vbMw== X-Received: by 10.69.17.66 with SMTP id gc2mr25851945pbd.90.1403826264411; Thu, 26 Jun 2014 16:44:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1403796296902-5062183.post@n6.nabble.com> References: <1403796296902-5062183.post@n6.nabble.com> From: Ian Kelly Date: Thu, 26 Jun 2014 17:43:44 -0600 Subject: Re: Execute a python script with CGI ? To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403826272 news.xs4all.nl 2940 [2001:888:2000:d::a6]:54236 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73642 On Thu, Jun 26, 2014 at 9:24 AM, dandrigo wrote: > Dear all, > > I coded a python script (web service with query postgresql/postgis). Up to > now, i did several test on my local laptop station (windows). > > Now i want to execute this python script on our remote server (Web server : > Apache;OS : Linux). > > How to write a CGI template please? > > Could you throw light for me? > > Thank you very much. > > Regards. While you can run Python as a CGI, the recommended pattern is to use WSGI. I suggest starting here: https://docs.python.org/2/howto/webservers.html