I haven't done any curses programming, but from what I can see this is the site you need.
http://py-howto.sourceforge.net/curses/node7.html
How do you display with python+ncurses all those slick looking lines and blocks that you
can do easily with DOS ?
I try with(half-thick block) but on the Mandrake 8.0 console ICode:scr.addch(5,5,chr(221))
get the correct character with white backgroud and black foreground attribute, not the one
I set. With the 80x25 console I get blinking attribute.
I haven't done any curses programming, but from what I can see this is the site you need.
http://py-howto.sourceforge.net/curses/node7.html
If you give a man a fire he'll be warm, if you light the man on fire he'll be warm for life.
This is a rough idea of what the function should look like, atleast in my mind, for which I have just woke up so I could be totally off, especially since I"ve never used curses.
See if that does anything....I don't know if it will or not! I am at work otherwise I would try it out for ya!Code:import curses def main(): stdscr = curses.initscr() stdscr.start_color() if stdscr.has_color(): curses.initpair(1, curses.COLOR_RED, curses.COLOR_WHITE) stdscr.addstr(0,0,chr(221),curses.COLOR_PAIR(1)) else: print "Sorry your terminal is not capable of displaying\ color" main()
Aragorn
If you give a man a fire he'll be warm, if you light the man on fire he'll be warm for life.
Nice to have another Python programmer around here! hehe
Aragorn
If you give a man a fire he'll be warm, if you light the man on fire he'll be warm for life.
well it didn't work Aragorn, could it be Mandrake 8's termcap anomality
And'bout the py-howto, thx that what exactly what I'm reading while posting this.
Python still a very cool languange though
8)
Sorry it didn't work. I am not sure what to tell you, I'll look into it some more. I didn't try it on a Linux box yet, but it worked fine in Winblows(only thing I had available to me at the time). I'll toy around with it when I get home and get my Redhat Box set up!well it didn't work Aragorn, could it be Mandrake 8's termcap anomality
And'bout the py-howto, thx that what exactly what I'm reading while posting this.
Python still a very cool languange though
8)
Aragorn
If you give a man a fire he'll be warm, if you light the man on fire he'll be warm for life.
Another link from IBM developer works on Python programming. This one is about programming with Ncurses. Also has some links to more infromation.
http://www-106.ibm.com/developerwork...l-python6.html
Jim H
Bookmarks