Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Everything good about Python except GUI IDE? Date: Wed, 2 Mar 2016 13:15:39 +1100 Lines: 89 Message-ID: References: <64a6599c-fae1-469d-bcee-875165b3cc7d@googlegroups.com> <56d294f8$0$1604$c3e8da3$5496439d@news.astraweb.com> <56d5c4b6$0$1591$c3e8da3$5496439d@news.astraweb.com> <87y4a2ax8g.fsf@elektro.pacujo.net> <56d64730$0$1589$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 24qyk4fjPzMK0sOdn8v0tA+1le1uMQzFpQsjKSmK4t7w== 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; 'received:209.85.223': 0.03; 'subject:Python': 0.05; '(even': 0.05; 'json': 0.05; 'bash': 0.07; 'executable': 0.07; 'filename': 0.07; 'cc:addr:python-list': 0.09; '(ie.': 0.09; '(instead': 0.09; 'brackets': 0.09; 'icon': 0.09; 'optional': 0.09; 'tab': 0.09; 'python': 0.10; 'syntax': 0.13; 'wed,': 0.15; 'value.': 0.15; '"move': 0.16; '2016': 0.16; 'bash,': 0.16; 'command,': 0.16; 'delimit': 0.16; 'dir"': 0.16; 'downside': 0.16; 'drag': 0.16; 'esp': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'messy': 0.16; 'operations?': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'recognise': 0.16; 'recognised': 0.16; 'stdin': 0.16; 'subject:GUI': 0.16; 'wastebasket': 0.16; 'wrote:': 0.16; 'string': 0.17; 'cheap': 0.18; 'say,': 0.18; 'typing': 0.18; 'gui': 0.18; 'shell': 0.18; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'latter': 0.22; 'am,': 0.23; 'feb': 0.23; "python's": 0.23; "haven't": 0.24; 'import': 0.24; 'header :In-Reply-To:1': 0.24; 'command': 0.26; 'external': 0.27; 'parameters': 0.27; 'separate': 0.27; 'least': 0.27; 'message- id:@mail.gmail.com': 0.27; 'moved': 0.27; 'interface': 0.29; 'i/o': 0.29; 'quoting': 0.29; 'themselves': 0.29; "i'm": 0.30; 'folder': 0.30; "i'd": 0.31; 'guess': 0.31; 'rules': 0.31; 'option': 0.31; 'especially': 0.32; 'maybe': 0.33; 'point': 0.33; "d'aprano": 0.33; 'directory,': 0.33; 'steven': 0.33; 'though.': 0.33; 'similar': 0.33; 'structure': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'text': 0.35; 'done': 0.35; 'interact': 0.35; 'involving': 0.35; 'quite': 0.35; 'sometimes': 0.35; 'but': 0.36; 'too': 0.36; 'instead': 0.36; 'received:209.85': 0.36; 'basic': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'being': 0.37; 'display': 0.37; 'turn': 0.37; 'starting': 0.37; 'things': 0.38; 'received:209': 0.38; 'files': 0.38; 'sure': 0.39; 'format': 0.39; 'where': 0.40; 'still': 0.40; 'some': 0.40; 'your': 0.60; 'default': 0.61; 'identify': 0.61; 'no.': 0.62; 'skip:n 10': 0.62; 'more': 0.63; 'different': 0.63; 'great': 0.63; 'balance': 0.64; 'between': 0.65; 'mar': 0.65; 'media': 0.67; 'yourself': 0.73; 'clicking': 0.75; 'bulk': 0.76; 'completion': 0.79; 'hand': 0.82; 'absolutely.': 0.84; 'chrisa': 0.84; 'commands.': 0.84; 'costly': 0.84; 'courses;': 0.84; 'everything,': 0.84; 'framing': 0.84; 'sometimes.': 0.84; 'subject:good': 0.84; 'to:none': 0.91; 'courses.': 0.91; 'try.': 0.91; 'serious': 0.97 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; bh=5BegImgkC5PhgyItWnDBVOhy+GuMoJmcDa/Sa/klw7w=; b=qhY+p/+th0+zGa+He5iM6o6YLSl7mVkanAPQyaCX2t1IHUqKia7Q+aKXs5FOVsr9gt Jh3RMtMU0GwqKrI94k8yQro1T5ELYOQ/0mb1phxwlLSC31EK5uo5auuekUqUkjllqzCt JRfqyizPlbHPxQw9edrBqsrRLCAhvgrbsvwW+6IyHaevKAL/C7ynb+MBP2v1+N45WtRm DruftWuailyL2P0qzlhdOcMtRfEBbBLc5NB4lIs65tlGxGZ1Wk/rkATDjDTLgBj9wheD bko7nT5CujV1HZicdiqFuI0NoqpNA8WTaRHK87/ZfNVl8YdYoN38AvwnAF1vh/tpk/yO Ib+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=5BegImgkC5PhgyItWnDBVOhy+GuMoJmcDa/Sa/klw7w=; b=ES072myYdfGZ5b3AzUNm4LMo62FB0nksDX0Xn3sXrZiGzGB2cxhQZZLRyVcwk4S6zH EalnvetNlN88+75w7w3Uvb3sg5gZexZIhwLVRMo9Z8+piJb/VojQb9EcbPcouOad2sdQ W3Wpu3t8ES5ZDeSL52GOC35CbEvZBulSwpXLCQcuPPQ2mfN681xUDa6VYjrJtMlD73Gn Zd/pBrvd3tG3Wurqv5arqXJxgSECUhPJGUBxTgaXgjvHqR/i0P9boU8IbPU9RuHZU5Ow 9JGYY61+1kBN2t3VSfBveal0tUU2jstgrBESQiYNUws+lZkF4GY5gA7V2lr19fIGgFt6 JQJw== X-Gm-Message-State: AG10YOSWyitpc2GDHWEbBNKOhD0nGvxIfaFVxMqGsW558OLqpM6ELWnN0X3za9gYZbKD3IoM12Oo9bfCugK4XA== X-Received: by 10.107.158.20 with SMTP id h20mr27510025ioe.31.1456884940063; Tue, 01 Mar 2016 18:15:40 -0800 (PST) In-Reply-To: <56d64730$0$1589$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103831 On Wed, Mar 2, 2016 at 12:51 PM, Steven D'Aprano wrote: > On Wed, 2 Mar 2016 05:06 am, Marko Rauhamaa wrote: > >> Steven D'Aprano : >> >>> On Sun, 28 Feb 2016 11:38 pm, BartC wrote: >>>> It's the GUI users who are the Neanderthals, having to effectively >>>> point at things with sticks. Or have to physically move that rock >>>> themselves (ie. drag a file to a wastebasket). >>> >>> I haven't physically moved an icon to the wastebasket for years. I >>> point at the icon, right-click, and tell it "move yourself to the >>> trash". >> >> Do you find that interface convenient? Do you often find yourself >> clickety-clicking around to perform bulk file operations? > > Sometimes. Especially with media files which display a thumbnail, it is far > more convenient to be able to look at the icon and recognise the file than > to try to guess from the filename "x73nfh.jpg". And having recognised the > file visually, its often easier to drag it into the folder of your choice > than to type "mv x7 dir" in a separate window. > > But not always. It's much easier to do "mv foo* dir". Horses for > courses. Absolutely. Tab completion *ROCKS* when you know the file name - point-and-click is *SUPERB* when you want to identify things by some form of metadata that the GUI can pull out and display (image/video file thumbnails being one example; executable files can include their own icons, esp on Windows; etcetera). The downside of the GUI, here, is that it sometimes is quite costly to generate those thumbnails; tab completion is done by reading the directory, but thumbnailing a bunch of JPGs requires reading the file contents (even if you were actually planning on clicking on one of the text files in the same directory). Like you say, horses for courses; but in many cases, I'd recommend starting with the cheap option - the command line - and moving to the costlier one only in the situations where you know it's of value. >> What I'm thinking is, could Python turn into a serious competitor to >> bash? The standard shell suffers greatly from sloppy quoting, and many >> of the age-old list-processing idioms are more awkward than cute. > > No. Python's syntax is too wordy to make a good shell. You need brackets and > quote marks for everything: > > # bash > ls foo/bar > > # Python > ls("foo/bar") > > iPython is usable, by adding non-standard syntax to its REPL. I don't think > it's a serious contender as replacement for bash, but you could give it a > try. But the standard Python REPL? No. >> A python shell would need a well-thought-out default import plus a way >> to string together external commands. Maybe JSON or similar could be the >> standard I/O framing format (instead of SPC-separated fields and >> LF-separated records). I think the non-standard syntax plan is the way to do it. But the thing is, you either have a code-like structure where you delimit everything, or you have the messy rules involving quoting and interpolation. The well-established basic shell syntax of space-delimited parameters with optional quoting is a great balance between verbosity and complexity. Not sure what "LF-separated records" has to do with "SPC-separated fields", though. The latter is all about how you type a command, and the former is all about the way different commands interact via stdin and stdout. > You really want to be typing JSON by hand instead of space-separated > fields/arguments? > > # Python using JSON > ls('["-l", "foo/bar", "spam/ham"]') > > # bash > ls -l foo/bar spam/ham > > Bugger that for a game of soldiers. No kidding, but at least it's consistent. Maybe there's a middle-ground, where it's still perfectly consistent, while not being quite as verbose? ChrisA