cursor positioning and color

TuxTrax TuxTrax at fortress.tuxnet.net
Fri Sep 27 18:05:07 EDT 2002


On 26 Sep 2002 02:32:41 -0700, brrrent Wrote in
Steve Ballmers hair grease:

> bogusdrop at myself.com (TuxTrax) wrote in message news:<30770aa4.0209232242.1e91d9d5 at posting.google.com>...
>> bfarwick at juno.com (brrrent) wrote in message news:<1b6dca50.0209231022.6fae7f6d at posting.google.com>...
>> > TuxTrax at fortress.tuxnet.net (TuxTrax) wrote in message news:<slrnaoqv2q.hn4.TuxTrax at fortress.tuxnet>...
>> > > Being new to python, I would like to know how one goes about such 
>> > > tasks as precise cursor positioning and output to screen in color.
>> > > 
>> > 
>> > Hi Mathew,
>> > 
>> > Curses is the way to go when using Linux/Unix.
>> > 
>> > Wconio is the way to go when using Microsoft.
>> > You can find in the Vaults of Parnassus.  If you have any trouble
>> > locating it, let me know, I can email it to you.  Small library, works
>> > well.
>> > 
>> > All the best,
>> > 
>> > brrrent
>> 
>> Thanks Brent. Appreciate it. Am I to understand that there are no
>> python libraries that do this as a standard part of the python
>> distribution?
> 
> Mathew,
> 
> A linux or unix distribution without curses is just about unheard of.
> About the only chance of finding a linux installation without curses
> would be in a standalone firewall box.
> 
> WConio is a "tiny" download and very worth it.  Works like a champ. 
> One heck of a lot easier to grasp than curses.  Many thanks to Mr.
> Gonnerman for such a useful library.  If you write a python WConio
> app, why not just send WConio along with the python code.  As I said,
> it's "tiny".
> 
> brent
> 
>  
>> That would be preferable, as it would eliminate the requirement of
>> making
>> the user have curses on their system before they can use the code.
>> 
>> Cheers,
>> 
>> Mathew

Thanks for the info.

I won't be needing WConio, because I don't use windows.

However, I have been tinkering with curses (I use Linux exclusively) and
have found it frustrating. It looks like what I need, but I can't find much
by way of examples on line, as to how to use it.

for instance, when run from a file, this generates an attribute error:

import curses

stdscr = curses.initscr()

stdscr.addstr(0, 0, "Current mode: Typing mode", curses.A_REVERSE) 

_____________

Now that is exactly from the python docs. It croaks on line 3,

stdscr = curses.initscr()

but according to the docs, that initialization should work. Geeze, what
I want to do is so simple, I want to be able to position the cursor and
maybe use some color, in a text application. It shouldn't be this hard.
I had less trouble using NNTPlib.

Cheers,

Mathew

-- 
TuxTrax   (n.) An invincible, all terrain, Linux driven armored assault
vehicle that can take as much fire as it gives ;-)

Yes, I am a Penguin cult high priest. Flipper readings upon request.

ROT13 this email address to mail me:
bar jbeq abg guerr, uvtu qrfreg zna, ng lnubb qbg pbz




More information about the Python-list mailing list