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


Groups > comp.lang.python > #70509

Re: Strange syntax error, occurs only when script is executed directly

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.029
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'subject:error': 0.03; 'required,': 0.09; 'subject:script': 0.09; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'optional.': 0.16; 'subject: \n ': 0.16; 'subject:when': 0.16; 'wrote:': 0.18; '(but': 0.19; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; "i'm": 0.30; 'went': 0.31; 'url:wiki': 0.31; 'url:wikipedia': 0.31; "can't": 0.35; 'but': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'that,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'space': 0.40; 'between': 0.67; 'compliant': 0.68; 'url:%1': 0.72; 'citation': 0.84; 'received:50.22': 0.84; 'researching': 0.84
Date Tue, 22 Apr 2014 08:22:58 -0500
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Re: Strange syntax error, occurs only when script is executed directly
In-Reply-To <CAPTjJmo8_USjq+_rr3xMN-Uv7Si_1BTGLTVZfS+Phf_tJs1y+w@mail.gmail.com>
References <mailman.9431.1398162667.18130.python-list@python.org> <5356625a$0$29993$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmo8_USjq+_rr3xMN-Uv7Si_1BTGLTVZfS+Phf_tJs1y+w@mail.gmail.com>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - tim.thechases.com
X-Get-Message-Sender-Via boston.accountservergroup.com: authenticated_id: tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9441.1398172986.18130.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1398172986 news.xs4all.nl 2952 [2001:888:2000:d::a6]:39275
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:70509

Show key headers only | View raw


On 2014-04-22 22:52, Chris Angelico wrote:
> I'm pretty sure the POSIX standard stipulates that a space there is
> optional. Should be no difference between "#!/" and "#! /" on any
> compliant OS. (But I can't right now find a citation for that, so I
> may be wrong.)

I wondered this too, so went researching and found this:

  http://en.wikipedia.org/wiki/Shebang_%28Unix%29#Magic_number

which said that there was actually some contention that the space was
required, but that the specs state that both with-and-without are
permissible.

-tkc



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


Thread

Strange syntax error, occurs only when script is executed directly Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-04-22 12:29 +0200
  Re: Strange syntax error, occurs only when script is executed directly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-22 12:36 +0000
    Re: Strange syntax error, occurs only when script is executed directly Chris Angelico <rosuav@gmail.com> - 2014-04-22 22:52 +1000
      Re: Strange syntax error, occurs only when script is executed directly Andrew Cooper <root@127.0.0.1> - 2014-04-23 02:28 +0100
    Re: Strange syntax error, occurs only when script is executed directly Tim Chase <python.list@tim.thechases.com> - 2014-04-22 08:22 -0500
    Re: Strange syntax error, occurs only when script is executed directly Chris Angelico <rosuav@gmail.com> - 2014-04-22 23:26 +1000

csiph-web