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
0
votes
1 answer

How can I use readline to enable the user to "scroll" to previously entered lines?

I have a command-line application that works similarly to a shell in that is continuously asks the user for a command and performs a certain action based on the command given. I'd like to implement the "scroll-back" or "history" feature to allow…
Tyler Crompton
  • 12,284
  • 14
  • 65
  • 94
0
votes
1 answer

share perl curses UI object variable across multiple child processes

I am writing a tool which spawns multiple child processes. In fact 3 levels of child processes to speed up the entire logic/process. To display the output in terminal I have chosen Curses::UI. The curses ui objects/widgets are created at each level…
-1
votes
1 answer

How to use the curses module to display the colors calculated from the HSL model?

The code is based on three main components: hue, saturation and lightness. Hue represents the color itself, such as red, green, or blue, and is represented as an angle value between 0 and 360 degrees. Saturation indicates the purity or vividness of…
Cmistry
  • 173
  • 7
-1
votes
1 answer

NameError: name 'setupterm' is not defined??? How can I solve it?

NameError: name 'setupterm' is not defined ?? How can I solve it? File "c:\Users", line 5, in screen=curses.initscr() ^^^^^^^^^^^^^^^^
-1
votes
2 answers

Window displays screen without calling refresh()?

In the python curses documentation, it states the following: When you call a method to display or erase text, the effect doesn’t immediately show up on the display. Instead you must call the refresh() method of window objects to update the…
borrimorri
  • 119
  • 9
-1
votes
1 answer

Using `curses` and `print()` in the same script yields odd behaviour in the terminal

Considering the following curses console program in python. It should print the key variable on the terminal. However, there is also a window active so when print() invokes it really messes up the entire screen. I would like the print to occur in a…
-1
votes
1 answer

Sleep program for half a second in C on Linux

I just can't find a way to sleep my program or just make it wait for a set amount of miliseconds, I tried sleep() but it only works for full seconds, usleep() is giving implicit declaration error and correcting it to sleep(), nanosleep() also only…
Trickery
  • 15
  • 2
-1
votes
1 answer

ncurses dynamically-sized field, arrow key navigation, and trailing spaces

While using form fields I stumbled upon the following behavior of dynamically-sized fields. AFAICT, passing a right arrow key event to the form driver leads to appending of spaces to the field buffer. I.e., this: case KEY_RIGHT: …
Engineerist
  • 367
  • 2
  • 13
-1
votes
1 answer

not able to append in a list in curses module?

I want to take a user input with python curses module but every time it is not adding any element in the list can any one please help me my code :- import curses from curses import wrapper from curses.textpad import Textbox, rectangle tempo_list =…
-1
votes
1 answer

C curses cant go right

Hello i just tested curses.h on C, and i want a '#', that you can move. if i want to get right, and down it goes but when i try to go up and left it cant. while(ch = wgetch(win)) { switch(ch) { case 'w': …
zlSxrtig
  • 71
  • 6
-1
votes
1 answer

The Curses library `move` function gives an error

#include #include #include int main(int argc, char *argv[]){ move(12, 6); printf("hello world !"); return 0; } The move function gives an error.
-1
votes
2 answers

How to install two python versions in one computer

I have Python 3.10 (64-bit) on my computer. And I use VS Code. I need to install Python 3.8 (64-bit) because I need to work with curses and it only works with Python 3.8.
-1
votes
2 answers

python curses module for windows can't install

i try to install curses module on windows and it ends with this error picture:https://i.stack.imgur.com/fbKCJ.png
-1
votes
1 answer

Cannot print a sentence including space with libcurses

#include int main(){ initscr(); refresh(); char s[25]; mvprintw(1,0,"Enter sentence: "); refresh(); scanw("%s", s); // Input `one two`. mvprintw(2,0,"%s\n", s); // This just prints `one`. refresh(); getch(); …
Dan
  • 2,694
  • 1
  • 6
  • 19
-1
votes
1 answer

How to use ncurses color_output without init_pair?

Usually you need to write like below. start_color(); init_pair(999, COLOR_WHITE, COLOR_BLACK); attron(COLOR_PAIR(999)); addstr("neko"); In my case, there are plenty of RGB colors to display. I don't like to init_pair each times because it can be a…
eeeeeeeeengo
  • 133
  • 6