User Interface Suggestions? (newbie)

Grant Edwards grant.b.edwards at gmail.com
Thu Oct 6 13:09:30 EDT 2016


On 2016-10-06, Steve D'Aprano <steve+python at pearwood.info> wrote:
> On Thu, 6 Oct 2016 10:03 pm, BartC wrote:
>
>> I'd quite like to know too. However I've just tried a test sequence
>> ("<esc>[P1d" to move the cursor to row 1) and it didn't work. If there's
>> reason why something so basic won't work (hence the need for curses etc)
>> then that would be useful to know too. (And how does curses manage it?!)
>
> I believe that curses uses a large database of terminal types and
> associated escape sequences. So when you start it up, it determines
> what terminal type you have (that's black magic itself) and then
> works out what escape sequences you need.

Nothing magic, it just looks at the 'TERM' enviroment varible and
looks up that value in the terminfo database.

-- 
Grant Edwards               grant.b.edwards        Yow! I wonder if there's
                                  at               anything GOOD on tonight?
                              gmail.com            




More information about the Python-list mailing list