X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!news.muarf.org!news.ecp.fr!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3a.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; 'python.': 0.02; 'subject:Windows': 0.02; 'that?': 0.05; 'extent': 0.07; 'linux,': 0.07; 'subject:PEP': 0.07; 'subject:support': 0.07; 'high-level': 0.09; 'properly.': 0.09; 'subject:using': 0.09; 'things,': 0.09; 'windows,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'language.': 0.14; 'clunky': 0.16; 'descriptors,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'impractical': 0.16; 'it;': 0.16; 'subject: \n ': 0.16; 'subject:API': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'trying': 0.19; 'possible,': 0.19; 'thu,': 0.19; 'written': 0.21; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'subject: .': 0.24; 'cc:2**0': 0.24; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'specifically': 0.29; 'chris': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'that.': 0.31; 'bunch': 0.31; 'concern': 0.31; 'file': 0.32; 'interface': 0.32; 'running': 0.33; 'maybe': 0.34; 'subject:from': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'leads': 0.36; 'should': 0.36; 'performance': 0.37; 'generic': 0.38; 'pm,': 0.38; 'anything': 0.39; 'environment.': 0.39; 'supporting': 0.39; 'how': 0.40; 'even': 0.60; 'greatest': 0.60; 'most': 0.60; 'skip:* 10': 0.61; "you're": 0.61; 'myself': 0.63; 'skip:n 10': 0.64; 'different': 0.65; 'managing': 0.66; 'results': 0.69; '2015': 0.84; 'differences,': 0.84; 'dozens': 0.84; 'subject:skip:F 10': 0.84; 'notion': 0.91; '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=FGJLE7v/EtPPYUJ74xjRRA8hqyffFHGF18iuaZuyx8w=; b=LRiVmL9XFOHU7ImTaAln34Yov5ifWbu+272pPEzjSwqhikpyvDu6p8yJM4XRvnRA3e rZ8yDuNfSvD18LFSVASS+x5613576ycJ+Naj6xCbcZDYPx6mwajIUESSsWSmkcdYFOO9 wpCzUsZBME55Z9AZNhLcWDndP4EhuxNpzvd6769ZdarKAdswHfvAtvHXpNxs8e/DSVIb XzGDzwoHf3s1YAh3jhMW9Z2rBjhAd1saSBwuCYhvRY1XUhK2qWpOEuNdVoki67KCeNt1 DwyHTE17iP1XymiLeLkQdmJCzh1yf54XPbQ4aHgLWtIn4TLlUTxM3ZdIC/Y7p1P8kQoY XBCg== MIME-Version: 1.0 X-Received: by 10.107.160.202 with SMTP id j193mr4507266ioe.43.1431003196547; Thu, 07 May 2015 05:53:16 -0700 (PDT) In-Reply-To: <87a8xgk1ad.fsf@elektro.pacujo.net> References: <554AB8A5.708@davea.name> <554adcf8$0$11103$c3e8da3@news.astraweb.com> <1c51085e-7795-4afc-9a4c-ad8b3f3a73a6@googlegroups.com> <87ioc4k89v.fsf@elektro.pacujo.net> <554B4C49.7010500@davea.name> <87a8xgk1ad.fsf@elektro.pacujo.net> Date: Thu, 7 May 2015 22:53:16 +1000 Subject: Re: PEP idea: On Windows, subprocess should implicitly support .bat and .cmd scripts by using FindExecutable from win32 API 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.20+ 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431003199 news.xs4all.nl 2825 [2001:888:2000:d::a6]:59407 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90100 On Thu, May 7, 2015 at 10:41 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> I was specifically disagreeing with the notion that it's right and >> normal to write a bunch of platform-specific code in Python. That >> should be the rarity. > > Why is that? > > Code is written for a specific need and environment. Often trying to > write generic solutions leads to cumbersome and clunky results on *all* > platforms. > > A software system is defined through its interfaces. And the most important interface is with a human. Humans are the same whether you're running under Windows, Linux, or anything else. If you want to write single-platform code, go for it; but if you want to write cross-platform code, the best way is to let someone else take care of the differences, abstracting them away into a nice tidy thing that we call a high-level language. I don't need forking, file descriptors, or process IDs, to describe how a person uses my code. Those are *implementation details*. Now, it might be that I have to concern myself with some of them. Maybe I want to get optimal performance out of something, and that means using multiple processes and managing them properly. Maybe I need to interface with systemd, respond to dozens of different process-level signals, use directory notifications, and do a bunch of other Linux-only things, so maybe it's just completely impractical to consider supporting even BSD-based Unixes, much less Windows. So be it. But to the greatest extent possible, Python should let me write code that doesn't care about any of that. ChrisA