Path: csiph.com!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'configure': 0.04; '(b)': 0.07; 'bits': 0.07; 'puts': 0.07; '*is*': 0.09; 'it;': 0.09; 'lookup': 0.09; 'roger': 0.09; 'python': 0.10; 'language,': 0.11; 'do,': 0.15; 'options.': 0.15; 'arguments;': 0.16; 'descriptors,': 0.16; 'framework,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guessing': 0.16; 'key/value': 0.16; 'mapping;': 0.16; 'pairs': 0.16; 'pairs,': 0.16; 'rather,': 0.16; 'simple.': 0.16; 'subprocess': 0.16; 'wrote:': 0.16; 'basically': 0.18; 'library,': 0.18; '2015': 0.20; 'aug': 0.20; 'handles': 0.20; 'to:name:python-list@python.org': 0.20; '(a)': 0.22; 'code,': 0.23; 'bit': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; "doesn't": 0.26; 'figure': 0.27; 'compare': 0.27; 'not.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; '(used': 0.29; 'once.': 0.29; '(c)': 0.29; "i'm": 0.30; 'that.': 0.30; 'certainly': 0.30; 'rules': 0.31; "can't": 0.32; 'language.': 0.32; 'options': 0.33; 'conventions': 0.33; 'environment,': 0.33; 'lets': 0.33; 'languages': 0.34; 'file': 0.34; 'received:google.com': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'cases': 0.36; 'keyword': 0.36; 'to:addr:python- list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'agree': 0.37; 'stuff': 0.38; 'whatever': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'easy': 0.60; 'your': 0.60; "you'll": 0.61; 'provide': 0.61; 'making': 0.62; 'effective': 0.63; 'eight': 0.72; 'chrisa': 0.84; 'complexity': 0.84; 'flexibility,': 0.84; 'fortunately,': 0.84; 'hunter': 0.84; 'inherent': 0.84; 'limits,': 0.84; 'pike': 0.84 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=bAywaFuf2zTVqOtICX5dfLSXQJn3hBkf4yBF8zhyj5M=; b=i+sJATJ176iQ1OkAdAO1cMyWFDcHKCTClLkN5aC9+orGuNko6yUpjDwSvioA3KjJd4 ZU66GhYXK/3eLV1HwjgELrnur9GKUsBSdqJ//5ZRlbVnWuujWx5qwEDQgrydJ32pI/u3 jSDEIMO6DUH9jpHJiBs2NGUnN8TAklpnl/dud57ScxYxHmtvhOCjg0f1AhkP4deINM80 g/8BhKITFAUK/muSKMnFhPaGfNt7P+0sSgHTSqHLzHPLwzq0EYvAheAGLz7Bdhye3UhP wACexv6LgnK5XGCXY86OvokZCrPNIp2g3APLCVjm0okTJltk4ERE3763lxWtr4uemcKB Vttw== MIME-Version: 1.0 X-Received: by 10.107.31.134 with SMTP id f128mr18764914iof.19.1439203839248; Mon, 10 Aug 2015 03:50:39 -0700 (PDT) In-Reply-To: References: <3bf7a462-2c70-4e53-bfc6-86b5acb9f5f8@googlegroups.com> <20150809222725.GA35504@cskk.homeip.net> Date: Mon, 10 Aug 2015 20:50:39 +1000 Subject: Re: Pipes From: Chris Angelico To: "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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1439203848 news.xs4all.nl 2912 [2001:888:2000:d::a6]:42628 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95217 On Mon, Aug 10, 2015 at 12:55 PM, Roger Hunter wrote: > I agree that some of Python is simple but the description of subprocess is > certainly not. That's because spawning subprocesses is a complicated thing to do - or rather, it's a simple thing to do, but with a large number of options. This is particularly true when you want (a) security, (b) performance, (c) flexibility, and (d) convenience/simplicity in your code, as you basically can't have all of them at once. Compare other modern languages and how they go about spawning processes; chances are you'll see stuff about chroot, standard streams, environment, uid/gid, priority, file descriptors, resource limits, whether it uses a shell, and stuff like that. Python handles all of those using keyword arguments; Pike lets you provide an options mapping; I'm guessing Node.js has you provide an object with key/value pairs to configure it; whatever your language, whatever your framework, these features require a bit of complexity. Python *is* simple. As languages go, Python has far fewer edge cases and detaily bits than most. But you can't get away from the inherent complexity of computers... fortunately, Python puts most of that into its standard library, so you can follow the standard lookup rules and function calling conventions to figure out what's going on. Of course, simplicity isn't all there is to making a good language. Ook has just three tokens (used in pairs, making eight effective opcodes), but that doesn't make it easy to use. ChrisA