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

How can I escape sub-window with or without any input string in python curses?

In python curses, if I draw a sub-window using scr.subwin() to get input with getstr() function as below search_box = screen.subwin(3, 30, 20, 30) search_box.clear() search_box.box() search_box.addstr(1, 1,…
Manu
  • 325
  • 1
  • 4
  • 10
-1
votes
1 answer

One Character "lag" in Python 3 Curses Program

I'm attempting to create a roguelike using Python3 and curses. I've got everything displaying the way I want it to, but I've come across a strange bug in the code. There is a 1 key stroke delay in processing the commands. So, assuming traditional…
Jonathanb
  • 1,224
  • 1
  • 11
  • 16
-1
votes
1 answer

How should I be going about exiting python script when user types 'q'?

I'm trying to add code to exit my curses python script correctly when the user types q. I can't merely do CTRL+C because then curses won't be de-initialized correctly. I haven't found a good solution with getting user input that has a timeout so the…
minnymauer
  • 374
  • 1
  • 4
  • 17
-1
votes
2 answers

Python curses interface

I have developed a program using curses, everything is cool so far but I was wondering myself if there is a good pattern to split different views/panels of my program into smaller chunks callable by my main loop? Further informations: This program…
Dr I
  • 288
  • 5
  • 19
-1
votes
1 answer

How to skip a line using curses in Python?

I'm trying to find how to skip a line with curses. I've tried screen.addchr('\n') and screen.addstr("\n") but it didn't work. How can I do that ?
Mickaël B.
  • 325
  • 4
  • 14
-1
votes
2 answers

What header do I need in order to use UNIX library punction clear()

all I was compiling a source of my UNIX today when I noticed the following warning: implicit declaration of function 'clear' After I made a debug with the GDB on the binary, these came out: 0x090000002a242594 in clear () from…
-1
votes
1 answer

ncurses doesn't work with -lncurses

I try to use ncurses library in Ubuntu 12.04 LTS. It doesn't work. I go to step by step: Install: sudo apt-get update sudo apt-get install libncurses-dev main.cpp: #include #include int main(int argc, char *argv[]) { …
hoang
  • 3
  • 4
-1
votes
1 answer

Need a tool for exploring stacktrace frames

I commonly wind up trouble-shooting web apps written in varied languages, located on heterogeneous servers that aren't mine. I'm often in the situation of having a stacktrace from a log file, and wanting to explore the code associated with…
mc0e
  • 2,699
  • 28
  • 25
-1
votes
2 answers

Mac version of Python doesn't support UTF-8 in curses module?

I'm trying to display a lot of unicode text in my curses application. My development machine is MacOSx 10.6 and I use the default python shipped with Apple. Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on…
Patrick
  • 4,186
  • 9
  • 32
  • 45
-1
votes
1 answer

Prevent Terminal resize python curses

I'm writing a program on python curses and I was wondering if there is a way to block terminal resizing in order to prevent curses' crashing both on Linux and Windows. This is what happens.. Can I prevent this? Under Windows this does not happen…
Alessio Ragno
  • 476
  • 1
  • 6
  • 20
-1
votes
1 answer

PDCurses scrolling issue

Whenever I need a large data output in a console I just use setconsolescreenbuffersize() so I can always scroll back if amount of data exceeds the size of console. However, when using pdcurses I can't seem to make it so a window remembers its…
-1
votes
1 answer

How use curses.raw() and curses.cbreak()

So first I want to capture the keys (w,a,s,d) when are pressed. And I think with curses I can make it, but I am new using python, and I need help, How capture the key pressed in the keyboard. I try with a input but I need touch enter to change, but…
-1
votes
1 answer

Backspace character in curses

require 'curses' include Curses init_screen win2 = Window.new(3,160,12,10) win2.setpos(1,1) 6.times do |i| win2.addstr i.to_s win2.delch sleep 0.6 win2.refresh end #=> 0,1,2,3,4,5,6 And …
Starkers
  • 10,273
  • 21
  • 95
  • 158
-1
votes
3 answers

looking for x-platform python console library

I'm a Python newbie. I need something like Curses library for Python 2.6 or 3.1 to run on Windows and Linux without any code changes. I need functions for colorizing text and background, for clearing screen, for reading key code without showing…
d9k
  • 1,476
  • 3
  • 15
  • 28
-2
votes
1 answer

Python curses import error: 'from curses import ACS_DARROW, ACS_LARROW, ACS_RARROW, ACS_UARROW' not working

File "C:\Users\a small youtuber idk\Downloads\from curses import ACS_RARROW.py", line 2, in from curses import ACS_DARROW, ACS_LARROW, ACS_RARROW, ACS_UARROW i tried importing _curses and curses but nothg is working
1 2 3
66
67