Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject:not': 0.03; 'argument': 0.05; 'purpose.': 0.07; 'arguments': 0.09; 'parameter': 0.09; 'spaces': 0.09; 'subject:How': 0.10; 'windows': 0.15; '"file': 0.16; 'delimit': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'golden': 0.16; 'quoted': 0.16; 'sees': 0.16; 'unix,': 0.16; 'apps': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'slightly': 0.19; 'command': 0.22; 'certainly': 0.24; 'string,': 0.24; 'looks': 0.24; "i've": 0.25; '----------': 0.26; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; 'correct': 0.29; 'thus': 0.29; 'tim': 0.29; 'dos': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'comments': 0.31; 'chase': 0.31; 'quotes': 0.31; 'file': 0.32; 'this.': 0.32; 'entirely': 0.33; 'guess': 0.33; "can't": 0.35; 'agree': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'done': 0.36; 'application': 0.37; 'too': 0.37; 'convention': 0.38; 'window': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'rather': 0.38; 'little': 0.38; 'expect': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'days': 0.60; 'skip:u 10': 0.60; 'serving': 0.60; 'new': 0.61; 'back': 0.62; 'name': 0.63; 'more': 0.64; 'biggest': 0.67; 'wear': 0.68; 'jul': 0.74; '100%': 0.77; 'lack': 0.78; 'boxes.': 0.84; 'differently:': 0.84; 'subject:tell': 0.84; 'surround': 0.84; 'utilities,': 0.84; 'weather': 0.84; 'opens': 0.91; '2013': 0.98 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:to :content-type; bh=npZ1vH2XmO+IzYN9uP3jlcLpLtuzYX5shei8HX5dxhE=; b=ia7OnbH8gSVXArA2f9p8Z9N3XHkHSqLN3I+DEVWtGlui/LCfVJ1yrJ69c2mlKEFeI5 mHSBNiu4+zh5ZVStKlRYGqUfotjKs9reW7cQZKUpCNLal8rJ4J2hm4gKAPEkUZhn6rtK nVh+r+u94e3DXmcmZ3uxgDJxyL96ZKohbwoOHy/oKOirg8kNEef4dP3e8i9lmCgmX7fA 2ouYyeTlRAuopjhsZsJV2JGVo10oCqihqhjm6ryGZgd42GTVCucMALH0f0v/ie9GKErg 3Vs7Mm/sbC4yKdfzCA6v4x/+SEavzjtGHlsAOU3+XqR8EbVXq9RVMGyqt+eODwy9F4KH B1XQ== MIME-Version: 1.0 X-Received: by 10.58.187.4 with SMTP id fo4mr315933vec.55.1372860004624; Wed, 03 Jul 2013 07:00:04 -0700 (PDT) In-Reply-To: <20130703075046.2f0737de@bigbox.christie.dr> References: <51D37F8A.3010905@gmail.com> <51D3D415.5060802@timgolden.me.uk> <51D3E091.6020706@gmail.com> <51D3E5F9.6010008@timgolden.me.uk> <20130703075046.2f0737de@bigbox.christie.dr> Date: Thu, 4 Jul 2013 00:00:04 +1000 Subject: Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 49 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372860012 news.xs4all.nl 15927 [2001:888:2000:d::a6]:51941 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49734 On Wed, Jul 3, 2013 at 10:50 PM, Tim Chase wrote: > On 2013-07-03 09:51, Tim Golden wrote: >> We can certainly agree on this. I can't count the number of emails >> I've deleted as too hot-headed in response to dismissive comments >> about Windows as a platform. Some of them, at least, appear to be >> from people who last actually used Windows back in the 9x days when >> the command window was very limited indeed. > > I guess one of my biggest frustrations with the cmd.exe (and > command.com) interpreters is that argument processing is left to the > application, so each application may do it slightly differently: > > C:\temp\> find weather *.py > FIND: Parameter format not correct > C:\temp\> find "weather" *.py > ---------- WFD.PY > weather = Weather(lat, lon) > C:\temp\> findstr weather *.py > wfd.py: weather = Weather(lat, lon) > C:\temp\> findstr "weather" *.py > wfd.py: weather = Weather(lat, lon) > > And more maddeningly: > > C:\temp\> start file.txt > ... opens the file correctly in Notepad > C:\temp\> start "file with space.txt" > ... opens a new dos box with the name "file with space.txt" rather > than opening the file > C:\temp\> start "" "file with space.txt" > ... opens the file correctly in Notepad > > It's the little inconsistencies like this that wear daily on me. That > and the lack of built-in utilities, so I'm regularly adding GNU tools > on new boxes. The issue you have there is mainly that the quotes are serving double purpose. Yes, they delimit and thus can be used to surround a file name with spaces in it, but they're also significant to a couple of apps (FIND uses them to indicate the search string, START looks for a quoted argument to use as the title). I'm not entirely sure how it's done under the covers; C code looking at argc/argv sees quoted arguments without their quotes, exactly as I would expect on Unix, and yet the convention is to notice the quotes. The issue with START is 100% understandable and 100% annoying. ChrisA