Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #87418 > unrolled thread
| Started by | Jason Heeris <jason.heeris@gmail.com> |
|---|---|
| First post | 2015-03-14 21:50 +1100 |
| Last post | 2015-03-14 21:50 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Module/lib for controlling a terminal program using redrawing? Jason Heeris <jason.heeris@gmail.com> - 2015-03-14 21:50 +1100
| From | Jason Heeris <jason.heeris@gmail.com> |
|---|---|
| Date | 2015-03-14 21:50 +1100 |
| Subject | Module/lib for controlling a terminal program using redrawing? |
| Message-ID | <mailman.353.1426331491.21433.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
I am trying to automate the use of some old, in-house terminal-based programs that use screen redrawing for their interface. This includes single line redrawing (eg. using '\r' and overwriting), complete screen clearing, and fine-grained cursor movement and overwriting (probably not all in the same program at the same time though). Is there a module/library that can help me with this? I know of pexpect, but that seems more oriented towards line-by-line prompts that don't involve redraws (eg. login prompt, then password prompt on a new line). Think instead of trying to automate applications like emacs, aptitude or even nethack that redraw sections of the screen without making the terminal scroll. This automation requires more than just sending a set of keystrokes, but also reading what is displayed on screen and making decisions based up on that. Is there a library that can abstract the received redrawing activity so I don't have to even know if the application has, eg. used a carriage return or some other kind of cursor movement? Is there a way to just ask "if this were to be run in an ANSI terminal, what would be in each cell?" Python 2 or 3 are both fine, external packages are fine, but it has to work on Linux (eg. Ubuntu 14.04 or later, Debian Wheezy or later). Any pointers appreciated. Cheers, Jason
Back to top | Article view | comp.lang.python
csiph-web