Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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; '(at': 0.03; 'linux,': 0.05; 'removes': 0.05; 'executable': 0.07; 'subject:Windows': 0.09; 'python': 0.09; '22,': 0.09; 'follows.': 0.09; 'friday,': 0.09; 'scripts,': 0.09; 'itself.': 0.11; '(and,': 0.16; 'carriage': 0.16; 'chmod': 0.16; 'complained': 0.16; 'resolved:': 0.16; 'skip:[ 60': 0.16; 'windows?': 0.16; 'wrote:': 0.17; 'message-----': 0.17; 'platforms': 0.18; 'windows': 0.19; 'feb': 0.19; 'to:name:python-list@python.org': 0.20; 'latter': 0.22; 'this:': 0.23; 'installed': 0.23; 'to:2**1': 0.23; 'tried': 0.25; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'question': 0.27; 'run': 0.28; 'url:mailman': 0.29; 'fri,': 0.30; 'url:python': 0.32; 'file': 0.32; 'running': 0.32; 'skip:- 10': 0.32; 'url:listinfo': 0.32; 'to:addr:python-list': 0.33; 'pm,': 0.35; 'subject:?': 0.35; 'received:org': 0.36; 'subject:': 0.36; 'but': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'does': 0.37; 'sent:': 0.37; 'subject:: ': 0.38; 'from:': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'end': 0.40; 'url:mail': 0.40; 'son': 0.60; 'received:216': 0.62; 'email name:python-list': 0.62; 'benefit': 0.70; '2013': 0.84; 'ok?': 0.84; 'ware': 0.91 From: "Sells, Fred" To: James Harris , "python-list@python.org" Subject: RE: Shebang line on Windows? Thread-Topic: Shebang line on Windows? Thread-Index: AQHOEU9fP206TXgmnEaQz31EDVJekpiKhi6Q Date: Mon, 25 Feb 2013 12:35:37 +0000 References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.218.38] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361795789 news.xs4all.nl 6867 [2001:888:2000:d::a6]:56732 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39888 When moving from windows to unix you need to run "dos2unix" on any progra= ms that use shebang (at least with python 2.6) that is installed on some = platforms but must be installed on others like CentOs but it is in their re= pository. -----Original Message----- From: Python-list [mailto:python-list-bounces+frsells=3Dadventistcare.org@p= ython.org] On Behalf Of James Harris Sent: Friday, February 22, 2013 5:53 PM To: python-list@python.org Subject: Re: Shebang line on Windows? On Feb 22, 6:40=A0pm, Zachary Ware wrote: > On Fri, Feb 22, 2013 at 12:16 PM, Walter Hurry = wrote: > > I use FreeBSD or Linux, but my son is learning Python and is using=20 > > Windows. > > > My question is this: Would it be good practice for him to put=20 > > #!/usr/bin/ env python at the top of his scripts, so that if made=20 > > executable on *nix they will be OK? As I understand it this will=20 > > have no effect on Windows itself. > > Adding the shebang line on Windows would be excellent practice. A word of warning unless this has since been resolved: Whenever I have trie= d adding the shebang line on Windows and running it on Unix the latter has = complained about the carriage return at the end of the line. This means tha= t Unix does not work when invoked as follows. (And, yes, the file has had chmod +x applied.) ./program.py It is, of course, OK when run as python program.py but that removes some of the benefit of the shebang line. James -- http://mail.python.org/mailman/listinfo/python-list