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


Groups > comp.lang.python > #20556

Re: Python code file prototype

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!news.glorb.com!news-out.readnews.com!transit3.readnews.com!panix!gordon
From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: Python code file prototype
Date Fri, 17 Feb 2012 16:20:37 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 36
Message-ID <jhluol$63c$1@reader1.panix.com> (permalink)
References <66ea0353-02ee-4152-947a-97b44ff3ec45@p7g2000yqk.googlegroups.com>
NNTP-Posting-Host panix2.panix.com
X-Trace reader1.panix.com 1329495637 6252 166.84.1.2 (17 Feb 2012 16:20:37 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Fri, 17 Feb 2012 16:20:37 +0000 (UTC)
User-Agent nn/6.7.3
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20556

Show key headers only | View raw


In <66ea0353-02ee-4152-947a-97b44ff3ec45@p7g2000yqk.googlegroups.com> Bruce Eckel <lists.eckel@gmail.com> writes:

> There's an option when you do this to insert default file contents, so
> I began searching the web for some kind of prototype Python file that
> would be appropriate to start with. I'm certain I've seen this before
> and that there's been discussions about the best starting point for a
> python code file, but I find I can't get any search hits for it.

Here's what PyScripter inserts in a new python file:

  #---------------------------------------------------------------------
  # Name:        module1
  # Purpose:
  #
  # Author:      $USERNAME
  #
  # Created:     $DATE
  # Copyright:   (c) $USERNAME $YEAR
  # Licence:     <your licence>
  #---------------------------------------------------------------------
  #!/usr/bin/env python

  def main():
      pass

  if __name__ == '__main__':
      main()


Where $USERNAME, $DATE and $YEAR are expanded to the actual values.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

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


Thread

Python code file prototype Bruce Eckel <lists.eckel@gmail.com> - 2012-02-17 07:35 -0800
  Re: Python code file prototype John Gordon <gordon@panix.com> - 2012-02-17 16:20 +0000
    Re: Python code file prototype Ian Kelly <ian.g.kelly@gmail.com> - 2012-02-17 09:55 -0700
    Re: Python code file prototype Grant Edwards <invalid@invalid.invalid> - 2012-02-17 17:02 +0000
    Re: Python code file prototype Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-02-17 12:56 -0500
      Re: Python code file prototype Bruce Eckel <lists.eckel@gmail.com> - 2012-02-17 11:03 -0800
      Re: Python code file prototype Grant Edwards <invalid@invalid.invalid> - 2012-02-18 15:25 +0000

csiph-web