Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'author:': 0.03; 'subject:Python': 0.05; 'inserts': 0.07; 'subject:code': 0.07; 'python': 0.08; '__name__': 0.09; 'received:mail- lpp01m010-f46.google.com': 0.09; 'am,': 0.12; 'subject:file': 0.13; "'__main__':": 0.16; '9:20': 0.16; 'main():': 0.16; '\xa0def': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'cheers,': 0.20; 'suggest': 0.20; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'feb': 0.22; '\xa0if': 0.23; 'string': 0.24; 'cc:2**0': 0.26; 'there.': 0.27; 'message- id:@mail.gmail.com': 0.29; 'cc:addr:python.org': 0.29; 'received:209.85.215.46': 0.32; 'fri,': 0.34; 'file': 0.34; '17,': 0.34; 'doc': 0.34; 'received:google.com': 0.37; 'received:209.85': 0.38; 'skip:\xa0 10': 0.39; 'received:209.85.215': 0.39; 'received:209': 0.39; 'might': 0.40; 'john': 0.61; 'purpose:': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=49JUpZM8oRidYhJG0yZGTMal0qVMERWB1ivOtlnXcGY=; b=Lsk5OK6JJbarZnJiFyF45duC+/nXovYVzHONtul3GngSBp67cbayg1zHbDwbu6tklc uCYmqvtdnq0k+jFWAvqGZnBqtvmG24Ctq22KCg2AiOYNSuIU/yEyFX1YaE/foYq2JccP pExWjyNc5JQZrJLjSbEud3d9cPbccnDy4VzH0= MIME-Version: 1.0 In-Reply-To: References: <66ea0353-02ee-4152-947a-97b44ff3ec45@p7g2000yqk.googlegroups.com> From: Ian Kelly Date: Fri, 17 Feb 2012 09:55:46 -0700 Subject: Re: Python code file prototype To: John Gordon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329497777 news.xs4all.nl 6897 [2001:888:2000:d::a6]:33338 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20557 On Fri, Feb 17, 2012 at 9:20 AM, John Gordon wrote: > Here's what PyScripter inserts in a new python file: > > =A0#--------------------------------------------------------------------- > =A0# Name: =A0 =A0 =A0 =A0module1 > =A0# Purpose: > =A0# > =A0# Author: =A0 =A0 =A0$USERNAME > =A0# > =A0# Created: =A0 =A0 $DATE > =A0# Copyright: =A0 (c) $USERNAME $YEAR > =A0# Licence: =A0 =A0 > =A0#--------------------------------------------------------------------- > =A0#!/usr/bin/env python > > =A0def main(): > =A0 =A0 =A0pass > > =A0if __name__ =3D=3D '__main__': > =A0 =A0 =A0main() The shebang has to be the first thing in the file to be useful. As it is above, it might as well not be there. I would suggest also including a doc string in the skeleton. Cheers, Ian