Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98535

Re: using binary in python

Path csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: using binary in python
Date Tue, 10 Nov 2015 02:17:59 +1100
Lines 19
Message-ID <mailman.179.1447082283.16136.python-list@python.org> (permalink)
References <20151108212706.GA29701@z-sverige.nu> <mailman.168.1447065689.16136.python-list@python.org> <87d1vjigqf.fsf@elektro.pacujo.net> <mailman.169.1447067069.16136.python-list@python.org> <8737wfi9ss.fsf@elektro.pacujo.net> <mailman.174.1447077141.16136.python-list@python.org> <87si4fgs5f.fsf@elektro.pacujo.net>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de Ub85LNH1pqQMv3hrIE4JhQvuyefhq6ie3quinPkrOcTA==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; 'string.': 0.04; 'filenames': 0.07; 'cc:addr:python-list': 0.09; 'subject:using': 0.09; '"this': 0.13; 'subject:python': 0.14; 'server,': 0.15; 'file?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'why,': 0.16; 'wrote:': 0.16; "shouldn't": 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'along.': 0.22; 'text,': 0.22; 'am,': 0.23; "python's": 0.23; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'message-id:@mail.gmail.com': 0.27; 'accepts': 0.29; 'boundary': 0.29; 'objects': 0.29; 'there.': 0.30; 'entry': 0.31; 'getting': 0.33; 'point': 0.33; 'problem': 0.33; 'http': 0.33; 'tue,': 0.34; 'file': 0.34; 'lists': 0.34; 'received:google.com': 0.35; 'text': 0.35; 'nov': 0.35; 'text.': 0.35; 'unicode': 0.35; "isn't": 0.35; 'should': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'things': 0.38; 'received:209': 0.38; 'why': 0.39; 'where': 0.40; 'mark': 0.40; 'field': 0.60; 'between': 0.65; 'chrisa': 0.84; 'hassle?': 0.84; 'os?': 0.84; 'to:none': 0.91
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=lPZH/YexuO1CbQE/SqlYKZHlRTtCmyboDaOdCYM411A=; b=mP1DmhpBGvlNdRk9FM4SLmYHL0P2ekWmrgcKjhopap6d9IqrDQZmFPSTklzvN2smn0 hw39LGUP5Oi4A7N44hkkcZiAqVGlMfgGHnrctWufkhEisYCsN+ILKPHhYTpiXtyXHysE gbGXs3vNCGapjC6tlx1scSIDooA2SxHXoxLgQYNvhnoFX5Q/9NC3vQRONlrVoElvhPRb lVVmcT2pMgTXYNN2ZLlC1ld2/z83JOD7w62sMr+7cFMSUzAVn127s+CqVbTH403SnRRh yL6vROFW8QOFtOtvoBYR9H3JBrDZoyujaJH9jZ5kHYqWL3SclmzHu/Al5EmbOLokzQQg BaHg==
X-Received by 10.107.10.233 with SMTP id 102mr8763567iok.31.1447082279686; Mon, 09 Nov 2015 07:17:59 -0800 (PST)
In-Reply-To <87si4fgs5f.fsf@elektro.pacujo.net>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:98535

Show key headers only | View raw


On Tue, Nov 10, 2015 at 1:32 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Yes, and lists and dicts and ints and objects and all. No problem there.
>
> However, when filenames and sys.stdin deal with text, things are getting
> iffy.

So where do you mark the boundary between the human and the OS? If I
create a GUI, I should be able to put an entry field down that accepts
Unicode text. And if I make a web form and an HTTP server, a user
should be able to type Unicode text into an <input> field and send
that along. Either way, my program should get a Unicode string. Why
shouldn't I be able to do the same with input()? And why, if a user
enters a plausible file name, should that not be able to be opened as
a file?

At what point do you say "this is for humans, this is for machines"?
Isn't it Python's job to spare us that hassle?

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: using binary in python Michiel Overtoom <motoom@xs4all.nl> - 2015-11-09 11:40 +0100
  Re: using binary in python Marko Rauhamaa <marko@pacujo.net> - 2015-11-09 12:56 +0200
    Re: using binary in python Chris Angelico <rosuav@gmail.com> - 2015-11-09 22:04 +1100
      Re: using binary in python Marko Rauhamaa <marko@pacujo.net> - 2015-11-09 15:25 +0200
        Re: using binary in python Chris Angelico <rosuav@gmail.com> - 2015-11-10 00:52 +1100
          Re: using binary in python Marko Rauhamaa <marko@pacujo.net> - 2015-11-09 16:32 +0200
            Re: using binary in python Chris Angelico <rosuav@gmail.com> - 2015-11-10 02:17 +1100
              Re: using binary in python Marko Rauhamaa <marko@pacujo.net> - 2015-11-09 17:46 +0200
                Re: using binary in python Chris Angelico <rosuav@gmail.com> - 2015-11-10 02:57 +1100
                Re: using binary in python Marko Rauhamaa <marko@pacujo.net> - 2015-11-09 18:17 +0200

csiph-web