ncurses

Can I determine if the terminal interprets the C1 control codes?

ISO/IEC 2022 defines the C0 and C1 control codes. The C0 set are the familiar codes between 0x00 and 0x1f in ASCII, ISO-8859-1 and UTF-8 (eg. ESC, CR, LF). Some VT100 terminal emulators (eg. screen(1), PuTTY) support the C1 set, too. These are the values between 0x80 and 0x9f (so, for example, 0x84 moves the cursor down a line). I am...

what would be a good alternative to ncurses that will work under emacs shell?

I'm an avid Emacs user and love shell-mode that in my opinion brings the best of two worlds: Emacs buffers and terminal emulators. For me shell-mode's biggest down fall is that ncurses based applications wouldn't render correctly. Having the need to design & code a little monitoring app in C that reads and write to standard input & out...

NCurses Refresh

I have a small ncurse program I'm running, but the output doesn't seem to show up unless I stick the wrefresh() in a while loop. Is there some buffering going on or something? I tried other refresh functions in the library and fflush with stddout (which I don't think makes sense, but worth a try), but nothing seems to work. A second sma...

Debugging ncurses with Eclipse CDT

I'm writing a C++ application using ncurses in Eclipse CDT however I can't run/debug my app in eclipse because the console in eclipse does not work with curses. My app runs fine if I run it from a terminal but I just added some new code and now I'm getting a segmentation fault so I'd like to use the debugger in eclipse to help me fix the...

How to get input from keyboard while doing other things at the same time?

I'm using C (gcc) and ncurses, to make a program that will be monitoring data coming from the serial port. The program has a big while, where it reads the data coming from the port and at the same time, it prints that info in the screen... But the problem is here: How can it read input from my keyboard, (since getch() freezes the progr...

Displaying log data in latest-first format

I like having log data in a last-first form (the same way most blogs and news sites organize their posts). The languages I'm most comfortable in are C++ and Python: is there a way to output log data either to the screen (stdout) or a file with the most recent entry always being on top? Or is there perhaps a way of modifying tail to sho...

Linux: Pipe into Python (ncurses) script, stdin and termios

Hi all, Apparently this is almost a duplicate of "Bad pipe filedescriptor when reading from stdin in python - Stack Overflow"; however, I believe this case is slightly more complicated (and it is not Windows specific, as the conclusion of that thread was). I'm currently trying to experiment with a simple script in Python: I'd like to...

Create a function to check for key press in unix using ncurses

I have been looking for an equivalent to kbhit() and I have read several forums on this subject, and the majority seems to suggest using ncurses. How should I go about checking if a key is pressed in c++ using ncurses. The function getch() provided by ncurses reads character from the window. I would like to write a function that only c...

Why multiple definitions? Why are other references not defined? This is really basic, what am I missing?

I have a small project that I need to compile. I have one header and one source that I have created and a nearly empty driver.c that includes my header. Observe: // iol.h #ifndef __IOL_HEADER #define __IOL_HEADER /* program: iol.h date: 5 October 2010 */ #define UNIX 1 #define WINDOWS 2 #define OS UNIX #if OS == UNIX #...

Overriding "initialize" in Ruby Ncurses::WINDOW class?

I have following code to try and alter the default Ruby Ncurses behavior: #!/usr/bin/env ruby require 'logger' require 'rubygems' require 'ncurses' class Ncurses::WINDOW def initialize( height, width, starty, startx ) w = super( height, width, starty, startx ) w.clear w.move(0,0) w.addstr('first psot') ...

Python3 and terminal widgets

Hi, I'm looking for a terminal UI library having widgets (like buttons, checkbox, ...), and compatible with python3. I tried : pycdk (pyrex does not work with python3, and porting it is a mess) urwid (does not work with python3, it has a port but not working well with new curses interface). Does anyone know such a library ? Thanks...