ActiveState Community

Linux console macros

Posted by javi on 2009-04-20 06:20

Hello,

I am trying to create a text-based interface (I am forced to do this because it should run in a dhcp server as shell, I cant use Tk) I was thinking about create a frame and use it as listbox, A good example (same concept) about what I need is here: http://wouter.coekaerts.be/irssi/nlscreen.png - I was reading about term:: macros but I did found no examples for this buffering style.

Someone can help me with this issue? I am stuck at this point.

Best regards

troyt | Tue, 2009-04-21 11:42

I believe irssi uses curses, so this might be helpful:

http://wiki.tcl.tk/2372

CK8.0 Curses Tcl Toolkit:

http://www.ch-werner.de/ck/

javi | Wed, 2009-04-22 08:46

Yes, it looks what I need,
After searching documentation I found a patch, it worked compiling Ck8.0 in Debian, by some reason that I still don't know, 'cwsh' open and closes itself and it is not able to run any command. I'm giving up, this looks quite complicated than I thought (and seems out of date). By the way, I have found a libtclterm that handles cursor only.

Looking irsii's docs, it uses fifo or screen but I feel that is not what I am looking for in Tcl.

The alternative is: Is there some way using term::interact::menu or similars to get it?

(edited) Self answer:
Using stty's characters I believe I can handle that, in example uts -nonewline "\u001b\30htext" and similar