I'd like to create a progress bar to indicate the status of an a batch job in Ruby. I've read some tutorials / libraries on using ncurses, none of which were particularly helpful in explaining how create an "animated" progress bar in the terminal or using curses with Ruby. I'm already aware of using a separate thread to monitor the progr...
hi!
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 after a while of searching, it seems that printing it gray + BOLD makes it!
Any he...
I am studying for an exam and I am confused as to how canonical vs. non-canonical input/output works in Unix (e.g., curses). I understand that there is a buffer to which "line disciplines" are applied for canonical input. Does this mean that the buffer is bypassed for non-canonical input, or does it simply mean that no line disciplines...
I want to write a simple chat-client in Ruby for the terminal.
The Problem is, that I need two separate "windows", one for the chatlog and another for the input prompt. I dont have a clue how to do this. I watched (n)curses and some other ruby-libs, but nothing gives me this functionality.
.------------------------------.
| Mike: Hi Je...
This might be a problem with my understanding with Curses more than with Perl, but please help me out. I'm using Curses.pm which works quite well except when I try to create a curses "window". Example code:
use Curses;
initscr;
$w=newwin(1,1,40,40);
$w->addstr(20,20,"Hello");
$w->refresh;
refresh;
endwin;
outputs nothing. Not using a ...
Hi,
how can i catch key combinations like ALT+K or CTRL+ALT+H in python curses?
Thanks in advance.
...
I'm looking for tutorials on using PDCurses library. Unfortunately there is text only documentation, which is more like function reference. Are pdcurses similar enough to ncurses to use ncurses tutorials??? Any tips for making console UI's ???
PS. PDCurses - mingw32.
...
Can anyone recommend a C++ wrapper for ncurses?
...
I have some legacy C code that I recently compiled on Linux. On the original HPUX the application opens and closes multiple curses windows. On the Linux box it can handle one window, but if I close that window, it crashes the program with an error message of "Aborted". Any ideas?
...
Hello im using curses to develop a small console application.
I have a main loop section wich waits for user input, it uses the getstr function, of course this waits for the user to press enter.
I would like to capture the up and down and tab keypresses. I suppose this can't be done with getstr.
Anyone have any idea how to do this?
...
I'm attempting to build Python 2.6.2 from source on my Linux system. It has ncurses installed on /usr/local/, and curses.h is on /usr/local/include/ncurses. So curses.h isn't found on the include path, and those packages fail in the Python build.
What's the right solution to this? Is Python supposed to include <ncurses/curses.h>? Sh...
I have the following code
class TimeReport
def run
init_screen
lines = Curses::lines
cols = Curses::cols
read=""
begin
crmode
noecho
gotoDay diaActual.data.to_s #loads the screen with data
while !read.eql?("q")
printPrompt #simply prints the command prompt
read=STDIN.get...
hi, I wondered if anyone knew of, or had written a curses/text mode email client for MAPI
Rationale is that Outlook is pretty fat these days, and quite slow.
I'm thinking that this might be slight a strange thing to do, as google searches for anything that might do this already were largey fruitless :)
-ace
...
In trying to get input from the arrow keys via curses (ncurses) it won't catch as KEY_UP etc. I used the keypad function with a true argument but getch still returns an escaped sequence. How do I sift through the values returned by getch() and grab the arrow keys specifically?
...
I've been reading tutorials about Curses programming in Python, and many refer to an ability to use extended characters, such as line-drawing symbols. They're characters > 255, and the curses library knows how to display them in the current terminal font.
Some of the tutorials say you use it like this:
c = ACS_ULCORNER
...and some sa...
Hello All.
I am working on a simple console app to get my feet wet with curses again. I am having a bit of a problem porting my app from xp to AIX. Here is a sample chunk of code.
int main(void)
{
WINDOW *_window = initscr();
int _rows;
int _cols;
cbreak();
/* Accept all keys */
keypad(_window, true);
...
Does anyone know of any good tutorials for learning Ruby with Curses? I just can't seem to find one and the doc is very vague. I have never used curses before so I really don't know much about it.
...
While Python's standard library has a module for curses, that seems to require a lot of fairly low-level handling.
Is there a simpler way to get started with writing a basic curses UI which includes standard elements like checkboxes, input fields etc.?
I've found urwid, but not sure whether that's the state of the art.
...
Trying to get getch() working to capture key press.
#include <curses.h>
...
...
WINDOW *w;
char f;
w = initscr();
timeout(3000);
f = getch();
endwin();
is giving me following error:-
undefined reference to `wgetch'
undefined reference to `stdscr'
...
Hello,
I wrote a small python script for vim that uses the curses library.
When I try to call the function curses complains about:
Traceback (most recent call last):
File "<string>", line 9, in <module>
File "/usr/lib/python2.6/curses/__init__.py", line 33, in initscr
fd=_sys.__stdout__.fileno())
_curses.error: setupterm: could not find...