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

How can i find memory leaks in my program?

Im building a terminal-based file viewer project with ncurses.h and C. Its only a side project as a hobby, and has a few lines of code. I get some segmentation errors and I don’t even have a clue where they are, if someone can check the code, I will…
Apesteguia
  • 38
  • 5
-2
votes
1 answer

Python Curses Program runs faster while repeatedly pressing a key

I have been making an ascii based game. It uses curses and timeout to make the game not wait for user input. But pressing a key repeatedly will make the game much more faster. I was wondering if there was a way to stop…
kible
  • 31
  • 5
-2
votes
1 answer

How to use 2 shells for a python script

I have a python project that I use curses. I would like to open another shell for piping some of my outputs, how shall I achieve this? Clarification: I am writing a TUI using Curses module of python. Therefore my initial bash shell is a curses…
-2
votes
2 answers

del_panel function of ncurses library causes segfault

I have a code that allocates panels in one function with new_panel and tries to deallocate them with del_panel in another function. The code sample is below void medical_cards(int regid){ //work with patient's medical cards /*...*/ PANEL…
Babur Makhmudov
  • 307
  • 1
  • 8
-2
votes
1 answer

How to install curses in anaconda for windows 7

Whenever I try to install curses, I get this error: Can anybody please tell me what am I doing wrong?
-2
votes
1 answer

Segmentation fault while calling getch()

I am trying to make a simple console program using curses on ubuntu, but each time I try to call getch and make it wait for input, when I input the input, it throws a segmentation fault. I did initialize the library using the initscr() function in…
mindoo
  • 1
  • 6
-2
votes
2 answers

How do you take a nested list and display it in curses?

I want to take a list like this mylist = [['_','X','_'],['X','_','_'],['X','_','_']] and display it like this: _ X _ X _ _ X _ _ would I use 2 nested loops and build a string? mystring='' for line in mylist: for char in line: mystring +=…
lol
  • 481
  • 6
  • 18
-2
votes
1 answer

Creating a Curses menu bar in Python

I'm using Python with the curses import for a console application. I'd like to add a typical Menu bar at the top. I've found a couple different libraries, as well as the Python built-in panel feature for doing so, but since I'm pretty new to Python…
wufoo
  • 13,571
  • 12
  • 53
  • 78
-2
votes
3 answers

KEY_DOWN not working in CURSES

I'm building a curses module and using KEY_DOWN to check if a arrow down key is pressed. But, I get a Name error saying KEY_DOWN is not defined. if value == KEY_DOWN: NameError: global name 'KEY_DOWN' is not defined
user1050619
  • 19,822
  • 85
  • 237
  • 413
-2
votes
2 answers

iterm gnu bash visual corruption

When i paste a command in to bash and hit enter, the next lines prompt contains half of the previous issued command. E.G: host:/Users/user $ some really long command pasted in -bash: some: command not found host:/Users/user $ some really command…
Michael
  • 1,032
  • 2
  • 15
  • 31
-3
votes
1 answer

Why am i getting the error 'Module 'curses' has no 'newwin' member'

i am getting the error 'Module 'curses' has no 'newwin' member' and i dont know why i am new to curses and i am trying to make a snake game. this is just some of the code so don't base it off that unless in good reason import random import…
-3
votes
4 answers

How to use the move function under curses.h

It doesn't print at coordinates y=10, x=20. #include #include int main() { initscr(); refresh(); WINDOW *win; wmove(win, 10, 20); refresh(); printf("hi\n"); return 0; } When I execute it like…
Sailesh010
  • 49
  • 6
-3
votes
1 answer

Get just one char from long keypress python curses [accepted]

Hi I'm writing a program in python curses and I need to get just one char from a long keypress. (In other words what I need is that if i keep pressing down a key my program just has to get the char with the function getchar() just once). I need that…
Alessio Ragno
  • 476
  • 1
  • 6
  • 20
1 2 3
66
67