Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed1a.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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:error': 0.03; '22,': 0.09; 'difference,': 0.09; 'subject:script': 0.09; 'cc:addr :python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'optional.': 0.16; 'solaris,': 0.16; 'subject:when': 0.16; 'tends': 0.16; 'wrote:': 0.18; 'bit': 0.19; '(but': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header :In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'lines': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'this.': 0.32; 'linux': 0.33; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'should': 0.36; 'being': 0.38; 'pm,': 0.38; 'that,': 0.38; 'sure': 0.39; 'space': 0.40; 'remove': 0.60; 'first': 0.61; 'more': 0.64; 'between': 0.67; 'compliant': 0.68; 'bang': 0.84; 'citation': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=gYvyU+/zAJSaN8VkCNEsKmHeLNkmYT7XLRfvJwHoewY=; b=UjRl833FI7tVMZyd0EYZptQw3TX030HTQZPcCFwjC554h6FKU2U9QeBfTCMMyXmTpn m3hVp62JP8zfI5vCbWks+JupSNHfntJPDWUl5sxbG41A6c7+qT9Oc6RdkHQaiX4HeqK7 Ab+lwmDIcOEaVO379FRb26llA2gVWbm8rHDyvn4+l4Ivo/W4pMzVo8c3ouhznqIMlPEk A1rtITlck0mR5368GtWAVVgGIofWxEGS5IRml7mHqWEjis9ZzzLJ299RQCrmR6egB2+q zx4Dgs69R8v4gVf3MWQ6XtRl6NfLz2rEMqhgUmsdKkBvsdiP+catapCtutICNd8QFoI6 Vnbw== MIME-Version: 1.0 X-Received: by 10.58.13.104 with SMTP id g8mr35872189vec.16.1398171148626; Tue, 22 Apr 2014 05:52:28 -0700 (PDT) In-Reply-To: <5356625a$0$29993$c3e8da3$5496439d@news.astraweb.com> References: <5356625a$0$29993$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 22 Apr 2014 22:52:28 +1000 Subject: Re: Strange syntax error, occurs only when script is executed directly From: Chris Angelico Cc: "python-list@python.org" 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1398171515 news.xs4all.nl 2886 [2001:888:2000:d::a6]:59237 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70506 On Tue, Apr 22, 2014 at 10:36 PM, Steven D'Aprano wrote: >> These are the 15 first lines of the script: >> >> #! /opt/local/bin/python > > This being Solaris, what happens if you remove the space between the hash- > bang and the path? On Linux it makes no difference, but Solaris tends to > be a bit more idiosyncratic about things like this. 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.) ChrisA