Questions tagged [curses]

Curses is a library for unix-ish computers that you can use to have better and more interactive consoles, including colors. It is used in some console games, like the original Rogue.

Curses is a library for unix-ish computers that you can use to have better and more interactive consoles, including colors. It is used in some console games, like the original Rogue.

See also: -

1003 questions
6
votes
1 answer

get updated screen size in python curses

I'm using the curses library in python and the only way I know to get the dimensions of the screen is with curses.LINES and curses.COLS. However, those values never get updated, even when a "KEY_RESIZE" key is read, like in the following…
Mei Zhang
  • 1,434
  • 13
  • 29
6
votes
2 answers

Ncurses no-wrap mode when adding strings to window

I'm adding strings to a window, with waddwstr() function, one line after other, in consecutive rows. I don't want ncurses to automatically wrap lines for me – I'm overwriting them with consecutive calls to waddwstr() and sometimes tail of previous…
Jerry Epas
  • 245
  • 3
  • 9
6
votes
2 answers

Attribute BOLD doesn't seem to work in my curses

I use something like this: screen.addstr(text, color_pair(1) | A_BOLD), but it doesn't seem to work.. However, A_REVERSE and all others attribute does work! In fact, I'm trying to print something in white, but the COLOR_WHITE prints it gray.. and…
Cathou
  • 61
  • 1
  • 2
6
votes
2 answers

python curses.newwin not working

I'm learning curses for the first time, and I decided to do it in python because it would be easier than constantly recompiling. However, I've hit a hitch. When I try to update a seccond window, I get no output. Here's a code snippet: import…
Hussain
  • 633
  • 1
  • 16
  • 26
6
votes
2 answers

Where can I find a good book on writing curses applications with perl?

I have been in search of a good way to write curses apps. So far I have found Curses::UI and Curses::Toolkit, but none of them are as maleable as I want them to be. Now I'm looking to write my app with just Curses itself, and learn something about…
fengshaun
  • 2,100
  • 1
  • 16
  • 25
6
votes
4 answers

How to make a scrolling menu in python-curses

There is a way to make a scrolling menu in python-curses? I have a list of records that I got from a query in sqlite3 and I have to show them in a box but they are more than the max number of rows: can I make a little menu to show them all without…
Alessio Ragno
  • 476
  • 1
  • 6
  • 20
6
votes
1 answer

Python curses print terminal color escape codes

I have a bash script that prints a nice big colorful table, using escape codes for foreground and background generated from tput. My curses application needs to call this bash script and put the output on the screen. When I try to do that, curses…
ACK_stoverflow
  • 3,148
  • 4
  • 24
  • 32
6
votes
3 answers

How to display pre-colored string with curses?

I'm writing a curses program in Python. I'm a beginner of curses but I've used terminal control sequences for colored output. Now there's some code snippets to print inside the window, I'd like them be syntax highlighted, and it's better done with…
secondwtq
  • 63
  • 2
  • 5
6
votes
1 answer

Shell in ncurses window?

I'm currently attempting to write a minimal terminal multiplexer using ncurses. However, when I try to execv a shell, it doesn't print to the window, and instead starts a new subprocess that takes control of the window (i.e. ignores ncurses). How…
CharlesL
  • 265
  • 5
  • 21
6
votes
1 answer

Running system commands in Python using curses and panel, and come back to previous menu

I'm coding a python script using several commanline tools like top, so i need a proper visual feedback. Now it is time to give it a menu, so here comes the problem. I found here a great approach of what i need, but every try to display a feedback…
peluzza
  • 329
  • 2
  • 4
  • 11
6
votes
3 answers

Python on AIX: What are my options?

I need to make some Python applications for a work project. The target platform is AIX 5.3. My question is: What version of Python should I be using? My requirements are: The Python version must be easy to install on the target machines. Others…
Enfors
  • 960
  • 2
  • 14
  • 25
6
votes
4 answers

How can I run a Java GUI application on a headless Linux that does not support GUI?

I have created a Java GUI application that is running in Windows. Now I want it to run it on a headless Linux instance that does not support GUI. I wanted to convert the GUI to TUI. Is there a way I can substitute some classes and make it run in…
Viki
  • 61
  • 1
  • 2
6
votes
1 answer

Can I use Python's curses and cmd libraries together?

In Python, I'd like to write a terminal program using both cmd and curses together, ie. use cmd to accept and decode full input lines, but position the output with curses. Mashing together examples of both curses and cmd like this : import curses…
interstar
  • 26,048
  • 36
  • 112
  • 180
5
votes
1 answer

How to resize curses pad?

How can I resize curses pad, created with newpad? There is window.resize function and although window is similar object as pad, nothing explicitly says I can use this function to resize pad.
Pablo
  • 28,133
  • 34
  • 125
  • 215
5
votes
3 answers

Keys not being interpreted by ncurses

I have a curses based application (WordGrinder). I've just had a bug report from a user saying that some keys aren't working properly on his keyboard. On investigation, he's right. The keys in question are SHIFT+cursor keys and some of the keypad…
David Given
  • 13,277
  • 9
  • 76
  • 123