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

Enter key not recognized with curses

I have this sample code where I write on the screen if the enter key is pressed but when I run the code nothing happens and nothing is written on the screen. I know I can use stdscr.getch(), but for some reason I don't want to use them. import…
Amey patil
  • 25
  • 1
  • 4
-1
votes
1 answer

curses: Straight line with last color at the bottom of the window in windows cmd

problem When I run a curses program via windows cmd.exe that outputs colored text I get an unselectable line on the bottom of the window. How can I remove it? example import curses def main(stdscr): curses.init_pair(1, 200, 100) …
rafalou38
  • 576
  • 1
  • 5
  • 16
-1
votes
1 answer

Python/Curses: Nothing happens on first key press

The code: from curses import curs_set, KEY_RESIZE, newwin, resize_term, wrapper from curses.panel import * VERSION = '0.0.0a' class Editor: def __init__(self, stdscr): curs_set(0) self.screen = stdscr self.max_rows,…
jp129096
  • 3
  • 2
-1
votes
1 answer

Python Curses addwstr() returned ERR when adding lines to screen

Suppose I am adding a large number of lines to a curses screen. Minimal non-working example: import curses class MyApp(object): def __init__(self, stdscreen): self.screen = stdscreen for i in range(0,100): …
Justapigeon
  • 560
  • 1
  • 8
  • 22
-1
votes
1 answer

Finishing a ncurses application and letting the screen untouched

When we end a ncurses application it (usually) restores the last terminal screen (at least in xterm emulators, it does). How to quit of a ncurses application properly (ending ncurses) and let the screen untouched? Actually, it's a function that…
Luciano
  • 2,695
  • 6
  • 38
  • 53
-1
votes
1 answer

stdscr.getstr() ignore keys, just string

I just need convert entered text(bytes) to string. But if i on cyrillic press Backspace and some character, python throw me this error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 10: invalid continuation byte What i can…
GENKY
  • 103
  • 8
-1
votes
1 answer

Snake moving faster when repeatedly pressing the key

I create the snake game with python and curses library. However I found the bug in the program. When pressing the key repeatedly, the snake move faster. Here is some part the code # standard initialization s =…
-1
votes
1 answer

How to fix unwanted curses output indenting

Continuous input code with arrow keys. Why is output repeatedly indented? I'm writing on C using the lncurses library. I need to get continuous input with the arrow keys but my output is all weird and intended. I tried swapping \n with \r, but then…
Nick
  • 54
  • 6
-1
votes
1 answer

How can I made a string that is updated by a thread reflect the changes on Python's curses?

I am planning to implement the curses library into an existing Python script for a client. The script will be run purely through SSH. I am currently attempting to simulate some of the output that my script would generate. In my 'testing-the-waters'…
GalacticRaph
  • 872
  • 8
  • 11
-1
votes
2 answers

Can not get a key with curses

I am trying to use curses to display some statistics, and I do face a problem. I wanted to have a window which allow scrolling thanks to the keyboard. For this, I create a variable self.scroll, which tells me which lines I should display. The…
Djazouli
  • 361
  • 1
  • 13
-1
votes
1 answer

Curses printing and updating bug

So I'm trying to program a server for my game. I want the server to look beautiful and organised and cross-platfrom too so I decided to you ncurses.. I'm trying to show at the top a loading the classical { '-', '\\', '|', '/' } thing but the problem…
Omarito
  • 577
  • 6
  • 22
-1
votes
1 answer

Programming text user interfaces on modern Windows

Is there any Windows way to go about creating text user interfaces via a terminal control library on modern Windows operating systems ? (7/8/10 etc) I am aware of the curses family of libraries have been ported from their Unix-like systems to work…
user1086516
  • 887
  • 3
  • 9
  • 21
-1
votes
2 answers

How to prevent having to get input twice in Curses navigation menu?

I have a menu I made in Curses in which the user can use the 'w' and 's' keys or up and down arrows on the keyboard to move up and down in the Curses menu. Once the Enter key is pressed, the system command 'ls' is called. The problem I am having is…
Prox
  • 699
  • 5
  • 11
  • 33
-1
votes
1 answer

How to print elements of array line by line and select each individual line with Ruby Curses?

I am currently print lines 0-3 in Ruby Curses. I also created an array with animal names. My program currently outputs dog + 0cat + 0bird + 0rat + 0 dog + 1cat + 1bird + 1rat + 1 dog + 2cat + 2bird + 2rat + 2 dog + 3cat + 3bird + 3rat + 3 I want…
Prox
  • 699
  • 5
  • 11
  • 33
-1
votes
2 answers

Function in a box curses

there. Can anyone tell me what I did wrong in the code? Why the timer function doesn't appear in the box? import curses from datetime import datetime stdsrc= curses.initscr() SPACE_KEY = ord(' ') box1 = curses.newwin(20, 30, 10, 10) box1.box() …
user7519
  • 17
  • 2