Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'api': 0.09; 'cc:addr :python-list': 0.09; '22,': 0.09; 'abstraction': 0.09; 'creighton': 0.09; 'though...': 0.09; 'python': 0.10; 'thursday,': 0.13; 'cc:name:python list': 0.16; 'curses': 0.16; 'something.': 0.16; 'subject:access': 0.16; 'wrote:': 0.16; 'looked': 0.16; 'laura': 0.18; 'pfxlen:0': 0.18; 'project,': 0.18; 'versions': 0.20; 'windows': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'installation': 0.23; "haven't": 0.24; 'thanks,': 0.24; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'message-id:@mail.gmail.com': 0.27; 'then.': 0.27; 'function': 0.28; 'this.': 0.28; 'expose': 0.29; 'subject:/': 0.30; 'creating': 0.30; 'certainly': 0.30; 'posts': 0.30; 'another': 0.32; 'though,': 0.32; 'maybe': 0.33; 'jump': 0.33; 'case,': 0.34; 'covered': 0.34; 'received:google.com': 0.35; 'next': 0.35; 'could': 0.35; 'mapping': 0.35; 'something': 0.35; 'problem.': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'url:org': 0.36; 'created': 0.36; 'possible': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'thanks': 0.37; 'missing': 0.37; 'front': 0.38; 'feedback': 0.38; 'represent': 0.38; 'why': 0.39; 'enough': 0.39; 'subject:-': 0.39; 'rather': 0.39; 'where': 0.40; 'some': 0.40; 'more': 0.63; 'different': 0.63; 'interest': 0.64; 'due': 0.65; 'else.': 0.66; 'person.': 0.70; 'url:htm': 0.75; 'hoping': 0.77; '"just': 0.84; 'oscar': 0.84; 'pain': 0.84; 'pip': 0.84; 'have.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=7sDyXdnUmK7YVteUm5KjAfnHYrVxc3TmyognoT8YgTA=; b=xYBS718l9ANgyY6IpjpjWK8CKsc5ApuZ6XQN8RaGvaAbpftH1bt0eV7d8KsNFZTUU8 RG82hXMAc3iTzQ0l3liLFfJI9ABU1ChmMMl+S+uQnRCC/9+5PGoNwkuz647OBCRjOhjK 1Yug0+soGvW7LiXtFi+nYf4G4o4wnXHeoRc2hH/T6F6cLMda80U63UwS+Z/Afu53OWNr OPS+0v+aC/1S8lTRnysOG9dpxrhBmBExeijX2ylaEQNZuv8YzfuqZXjukHJlyqNDkxIH h77/X+BveYYpm2E1TICbJLz7Yrngcw6AwVkH+OaD+TKxhIAOl9UcZml/t2wczpECw5n0 3lBQ== X-Received: by 10.25.30.84 with SMTP id e81mr5337425lfe.48.1445512220282; Thu, 22 Oct 2015 04:10:20 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <86bf9509-c512-4efa-9712-b51952a311e3@googlegroups.com> <0c3509e1-e27d-4804-88fb-b17d9d1172b4@googlegroups.com> From: Oscar Benjamin Date: Thu, 22 Oct 2015 12:10:00 +0100 Subject: Re: A high-level cross-platform API for terminal/console access To: Peter Brittain Cc: Python List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1445512228 news.xs4all.nl 23763 [2001:888:2000:d::a6]:56430 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 6360 X-Received-Body-CRC: 2457580536 Xref: csiph.com comp.lang.python:97892 On 22 October 2015 at 11:56, Peter Brittain w= rote: > On Thursday, October 22, 2015 at 10:24:11 AM UTC+1, Laura Creighton wrote= : >> Fredrik Lundh's console implementation >> http://effbot.org/zone/console-handbook.htm >> might be of interest in that case, but I think it is 'old versions >> of windows only'. But it's a different take on the abstraction >> problem. I haven't used it for something like 15 years now, though, >> so can barely remember it ... > > Thanks, but I think this is already covered in my original post: I couldn= 't use it directly due to the pip installation restriction. I've now creat= ed a working Windows implementation, so I don't need another mapping for wi= n32. > > More generally, as these posts begin to show, there was no _simple_ way f= or me to get a cross-platform console API that "just worked" out of the box= . I've had to jump through various hoops to get to where I am and don't th= ink that other people should have to go through the same pain as I have. I've looked for this in the past and I also found that there was no general solution that I could just pick and use for both Windows and everything else. Even just writing a cross-platform getch function is needlessly complicated. > This is one of the reasons why I've been tidying up my package to make th= is as simple as possible for the next person. I've now got to the stage wh= ere I have something that works for me, but it is almost certainly missing = something. Maybe it's not good enough documentation, maybe there's some cl= unkiness left in the API due to the history of the project, maybe there's a= n even better way to represent terminals than what I've come up with so far= ? > > I was hoping for feedback on this front rather than other ways I could re= create the curses package - unless of course, the general consensus is that= this really is the way that Python should expose access to the terminal/co= nsole. Thanks for creating this. I will try it out when I next want to create something like this and give some feedback then. I don't really know when that will be though... -- Oscar