Re: Replacing curses

2006-02-10 Thread Ian Ward
Ross Ridge wrote: In general it's impossible to know how many display positions some random Unicode character might use. For example, Chinese characters normally take two display positions, but the terminal your using might not support them and display a single width replacement character.

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-09 Thread Joel Hedlund
The code for handling window resizing isn't jumping out at me but I'll keep looking. (...jumping out, rather unexpectedly!) You might be interested in an ongoing discussion that I and Grant Edwards are holding in this newsgroup on the subject Best way of finding terminal width/height?.

Re: Replacing curses

2006-02-09 Thread Thomas Dickey
Ian Ward [EMAIL PROTECTED] wrote: I'm going to look at the Mined text editor for some terminal behavior mined_2000 (there's more than one program named mined, and the other doesn't do UTF-8). detection code. Mined is able to produce good UTF-8 output on a variety of terminals, and it links

Re: Replacing curses

2006-02-09 Thread Ross Ridge
Ian Ward wrote: I'll have to deal with that anyway, since I'm doing all my own wrapping, justification and clipping of text. In general it's impossible to know how many display positions some random Unicode character might use. For example, Chinese characters normally take two display

Re: Replacing curses

2006-02-08 Thread Thomas Dickey
Ian Ward [EMAIL PROTECTED] wrote: I've had to work around many curses issues while developing Urwid (a hmm - I've read Urwid, and most of the comments I've read in that regard reflect problems in Urwid. Perhaps it's time for you to do a little analysis. (looking forward to bug reports,

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-08 Thread Grant Edwards
On 2006-02-08, Ian Ward [EMAIL PROTECTED] wrote: I think there are enough escape sequences common to all modern terminals so that I can build a generic curses-replacement for my library. Why not use termcap/terminfo? -- Grant Edwards grante Yow! Where does it

Re: Replacing curses

2006-02-08 Thread Ian Ward
Thomas Dickey wrote: hmm - I've read Urwid, and most of the comments I've read in that regard reflect problems in Urwid. Perhaps it's time for you to do a little analysis. (looking forward to bug reports, rather than line noise) A fair request. My appologies for the inflammatory subject

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-08 Thread Ian Ward
Grant Edwards wrote: Why not use termcap/terminfo? That's a good idea, but I'd have to wrap the c library myself, wouldn't I? Also, what happens when a user has an incorrect TERM setting (I've run into this before) I don't want to reimpliment all the nice speed optimizations that the curses

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-08 Thread Grant Edwards
On 2006-02-08, Ian Ward [EMAIL PROTECTED] wrote: Grant Edwards wrote: Why not use termcap/terminfo? That's a good idea, but I'd have to wrap the c library myself, wouldn't I? Probably. I don't remember seeing a python module for them. Also, what happens when a user has an incorrect TERM

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-08 Thread Ian Ward
Grant Edwards wrote: Depending on what you're tring to do, slang might be an option, I've looked at newt and snack, but all I really need is: - a way to position the cursor at (0,0) - a way to hide and show the cursor - a way to detect when the terminal is resized - a way to query the terminal

Re: Replacing curses

2006-02-08 Thread Thomas Dickey
Grant Edwards [EMAIL PROTECTED] wrote: Depending on what you're tring to do, slang might be an option, perhaps not - he's trying to use UTF-8. I haven't seen any plausible comment that indicates John Davis is interested in updating newt to work with slang2 (though of course he's welcome to

Re: Replacing curses

2006-02-08 Thread Thomas Dickey
Ian Ward [EMAIL PROTECTED] wrote: Grant Edwards wrote: Depending on what you're tring to do, slang might be an option, I've looked at newt and snack, but all I really need is: - a way to position the cursor at (0,0) - a way to hide and show the cursor - a way to detect when the terminal is

Re: Replacing curses

2006-02-08 Thread Thomas Dickey
Ian Ward [EMAIL PROTECTED] wrote: Thomas Dickey wrote: hmm - I've read Urwid, and most of the comments I've read in that regard reflect problems in Urwid. Perhaps it's time for you to do a little analysis. (looking forward to bug reports, rather than line noise) A fair request. My

Re: Replacing curses

2006-02-08 Thread Donn Cave
In article [EMAIL PROTECTED], Thomas Dickey [EMAIL PROTECTED] wrote: Ian Ward [EMAIL PROTECTED] wrote: ... Also, screen resizing only seems to be reported once by getch() even if the user continues to resize the window. I have worked around this by calling curses.doupdate() between calls

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-08 Thread Jean-Paul Calderone
On Wed, 08 Feb 2006 15:10:26 -0500, Ian Ward [EMAIL PROTECTED] wrote: Grant Edwards wrote: Depending on what you're tring to do, slang might be an option, I've looked at newt and snack, but all I really need is: - a way to position the cursor at (0,0) - a way to hide and show the cursor - a way

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-08 Thread Ian Ward
Jean-Paul Calderone wrote: I've looked at newt and snack, but all I really need is: - a way to position the cursor at (0,0) - a way to hide and show the cursor - a way to detect when the terminal is resized - a way to query the terminal size You might be interested in Twisted Conch's

Re: Replacing curses

2006-02-08 Thread Ian Ward
Ross Ridge wrote: Thomas Dickey wrote: ...and send UTF-8 text, keeping track of where you really are on the screen. You make that sound so easy. I'll have to deal with that anyway, since I'm doing all my own wrapping, justification and clipping of text. (don't talk to me about RtoL text, I'm

Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-07 Thread Ian Ward
Martin v. Löwis wrote: Ian Ward wrote: Any Ideas? I think there is one or more ncurses bugs somewhere. The ncurses documentation suggests that you should link with ncurses_w instead of linking with ncurses - you might try that as well. If it helps, please do report back. Ultimately,