A high-level cross-platform API for terminal/console access

Peter Brittain peter.brittain.os at gmail.com
Thu Oct 22 06:56:35 EDT 2015


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 created a working Windows implementation, so I don't need another mapping for win32.

More generally, as these posts begin to show, there was no _simple_ way for 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 think that other people should have to go through the same pain as I have.  

This is one of the reasons why I've been tidying up my package to make this as simple as possible for the next person.  I've now got to the stage where 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 clunkiness left in the API due to the history of the project, maybe there's an 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 recreate the curses package - unless of course, the general consensus is that this really is the way that Python should expose access to the terminal/console.



More information about the Python-list mailing list