Hello, 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 letter on screen and for moving text cursor to specidied position.
It must be comple...
I need to make some Python applications for a work project. The target platform is AIX 5.3.
My question is: What version of Python should I be using?
My requirements are:
The Python version must be easy to install on the target machines. Others will do that according to instructions that I write, so no compiling from source or anythi...
I have stdin in a select() set and I want to take a string from stdin whenever the user types it and hits ENTER.
But select is triggering stdin as ready to read before ENTER is hit, and, in rare cases, before anything is typed at all. This hangs my program on getstr() until I hit ENTER.
I tried setting nocbreak() and it's perfect reall...
Over the past week I've been working on a roguelike game in C++ along with a friend. Mostly too learn the language.
I'm using:
pdcurses
Windows 7
Visual studio C++
To output wchar_t's wherever I want to in the console. I have succeeded in otuputting some unicode characters such as \u263B (☻), but others such as \u2638 (☸) will just ...
Hi,
I am trying from curses.ascii import * to django project, but I get: No module named _curses, I am using Python 2.5, any suggestion? Anyway I only need isalpha() function to use....
...
How to init a color pair with light grey background, and bright white foregraound?
init_pair(number, COLOR_WHITE, COLOR_WHITE) creates a color pair with light grey foreground and backround, but I need foreground to be really white. I tried combining COLOR_WHITE with A_BLINK (through bitwise OR) but that doesn't work. Ncurses howto's/exa...
I'm working on automation tools for an ERP program running on SCO Unix.
See my questions on Expect:
http://stackoverflow.com/questions/1987302/tcl-expect-clear-screen-after-exit
http://stackoverflow.com/questions/1988811/expect-get-variable-from-screen-region-based-on-row-and-column
Where can I find (either locally or on the web) res...
Hi.
I'm writing a curses application in Python under UNIX. I want to enable the user to use C-Y to yank from a kill ring a la Emacs.
The trouble is, of course, that C-Y is caught by my shell which then sends SIGTSTP to my process. In addition, C-Z also results in SIGTSTP being sent, so catching the signal means that C-Y and C-Z are not...
I've got a menu in curses that I'd like to put multi-line descriptions onto.
My code puts the description fields on but they don't display if they don't fit on the line.
Curses is happy enough printing multi-line text as strings (not as menu descriptions)
Any ideas how to get multi-line descriptions working ?
...
I'm calling python -m pdb myapp.py, when an exception fires, and I'd normally be thrown back to the pdb interpreter to investigate the problem. However this exception is being thrown after I've called through curses.wrapper() and entered curses mode, rendering the pdb interpreter useless. How can I work around this?
...
Where do stdout and stderr go when curses is active?
import curses, sys
def test_streams():
print "stdout"
print >>sys.stderr, "stderr"
def curses_mode(stdscr):
test_streams()
test_streams()
curses.wrapper(curses_mode)
Actual output is
stdout
stderr
Update0
Expected output is
stdout
stderr
stdout
stderr
entering,...
I can setup a telnet connection in Perl no problems, and have just discovered Curses, and am wondering if I can use the two together to scrape the output from the telnet session.
I can view on a row, column basis the contents of STDOUT using the simple script below:
use Curses;
my $win = new Curses;
$win->addstr(10, 10, 'foo');
$win->r...
Hi - I wondered if there were any tree libraries available for (n)curses.
I'm trying to write a component that shows a tree of folders & was curious if there was a prebuilt curses component that could do this.
I've checked 'core' curses as well as libraries like CDK - and I can't seem to find anything.
If none exists, I'm not averse ...
In my Python script which uses Curses, I have a subwin to which some text is assigned. Because the text length may be longer than the window size, the text should be scrollable.
It doesn't seem that there is any CSS-"overflow" like attribute for Curses windows. The Python/Curses docs are also rather cryptic on this aspect.
Does anybody...
Hell-o guys, I'm working on python curses and I have my initial window with initscr() and I create several new windows to overlap it, I want to know if I can delete these windows and restore the standard screen without having to refill it. Is there a way? I can also ask if someone can tell me the difference between a window, subwindow, p...
Picture a terminal. There are two windows inside that terminal. One on top, one on bottom. The top one is much bigger. The top one receives asynchronous updates. The bottom one is for user input.
It would work almost exactly the same as vim - the text editor.
I'm writing this in Python. I'm guessing you would do this by using curses,...
I am trying to use the library Curses:UI from http://search.cpan.org/dist/Curses-UI/
to build a UI on linux karmic.
I can create a simple user interface e.g.:
#!usr/usr/bin/perl
use strict;
use Curses;
use Curses::UI;
$ui = new Curses::UI(-color_support=>1,-clear_on_exit=>1,-intellidraw=>1);
my $window = $ui->add('window', 'Window',-...
When I'm using PDcurses and I try to have a while loop exit when the enter key is pressed with while(key != KEY_ENTER), the while loop never exits. However, when I try to have the same loop exit with while((char)key != '\n'), it exits successfully whenever I pressed enter. Why does '\n' work and not KEY_ENTER?
btw, key is an int
and I ...
So I have these lines of code:
int maxY, maxX;
getmaxyx(stdscr, &maxY, &maxX);
It gives me the following error:
error C2440: '=' : cannot convert from 'int' to 'int *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
twice for each time I use it. I'm not even using...
Okay, so I'm getting these warnings whenever I try to use stdscr in pdcurses:
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4049: locally defined symbol "_stdscr" imported
LINK : warning LNK4049: locally defined symbol "_SP" imported
How do I fix this? They're j...