Override on terminal

Thomas Bartkus thomasbartkus at comcast.net
Tue Apr 11 12:25:56 EDT 2006


"fivestars" <mattia.5stars at gmail.com> wrote in message
news:1144766236.330882.142520 at j33g2000cwa.googlegroups.com...
> Hi there.
>
> I'm computer science student at the end of my degree. I'm new about
> python.
>
> I've a question for all of you.
>
> Do you know how to write, from python code, on a unix(linux) terminal
> on specified coordinates?

Actually, there is no unix(linux) terminal.  What you have are terminals, of
various flavors, that can be attached to a unix(linux) session.

Once you decide to stray from generic spaces and tab formatting, it is the
terminal that has fancy features such as positioning the cursor at arbitrary
coordinates. And every terminal type has a different command sequence to
achieve that. That said, there are standards such as the VT-100 terminal
that everything seems to emulate.  You would need to have the VT-100 command
set in front of you and you would code this into your python routines.

Someone else has suggested the "curses" module.  I haven't played with this
but it is probably just the ticket you are looking for. It no doubt encloses
cgoto commands, blink, highlight, clear screen, color command & yada yada
for various terminal types inside nice python functions

And I'll be surprised if it doesn't default to VT-100 ;-)

> And also: is it possible to override, from python code, something on a
> unix(linux) terminal?

I don't know what that means.
If you meant overwrite (rather than override!), then the answer would be
yes.

Thomas Bartkus

> I would have a suggestion that won't use files.
>
> I hope that i've been clear.
>
> Thanks,
>
>       Mattia
>





More information about the Python-list mailing list