vt100

AJAX console window with ANSI/VT100 support?

大城市里の小女人 提交于 2019-12-03 00:15:28
I'm planning to write gateway web application, which would need "terminal window" with VT100/ANSI escape code support. Are there any AJAX based alternatives for such a task? I'm thinking something like this: http://tryruby.hobix.com/ My preferred backend for the system is Python/Twisted/Pylons, but since I'm just planning, I will explore every option. Try AnyTerm AjaxTerm WebShell There's also Shell In A Box . AjaxTerm has a terminal, with mostly felicitous terminal emulation, done on the Python backend (it just pushes display updates to the client Javascript). The AjaxTerm website has been

How to remove ANSI control chars (VT100) from a Java String

天大地大妈咪最大 提交于 2019-11-30 22:26:24
I am working with automation and using Jsch to connect to remote boxes and automate some tasks. I am having problem parsing the command results because sometimes they come with ANSI Control chars . I've already saw this answer and this other one but it does not provide any library to do that. I don't want to reinvent the wheel, if there is any. And I don't feel confident with those answers. Right now, I am trying this, but I am not really sure it's complete enough. reply = reply.replaceAll("\\[..;..[m]|\\[.{0,2}[m]|\\(Page \\d+\\)|\u001B\\[[K]|\u001B|\u000F", ""); How to remove ANSI control

Python regex to match VT100 escape sequences

蹲街弑〆低调 提交于 2019-11-30 18:54:11
I'm writing a Python program that logs terminal interaction (similar to the script program), and I'd like to filter out the VT100 escape sequences before writing to disk. I'd like to use a function like this: def strip_escapes(buf): escape_regex = re.compile(???) # <--- this is what I'm looking for return escape_regex.sub('', buf) What should go in escape_regex ? The combined expression for escape sequences can be something generic like this: (\x1b\[|\x9b)[^@-_]*[@-_]|\x1b[@-_] Should be used with re.I This incorporates: Two-byte sequences, i.e. \x1b followed by a character in the range of @

Python regex to match VT100 escape sequences

谁说胖子不能爱 提交于 2019-11-30 03:00:34
问题 I'm writing a Python program that logs terminal interaction (similar to the script program), and I'd like to filter out the VT100 escape sequences before writing to disk. I'd like to use a function like this: def strip_escapes(buf): escape_regex = re.compile(???) # <--- this is what I'm looking for return escape_regex.sub('', buf) What should go in escape_regex ? 回答1: The combined expression for escape sequences can be something generic like this: (\x1b\[|\x9b)[^@-_]*[@-_]|\x1b[@-_] Should be

what is terminal escape sequence for ctrl + arrow (left, right,…) in TERM=linux

江枫思渺然 提交于 2019-11-28 21:35:44
I am building a terminal window in a browser (sth. like ajaxterm) and don't know which escape sequence to send to ssh tunnel (opened via paramiko.SSHClient().invoke_shell(term='linux') ). I have found a key logger and tried it in a terminal with $TERM == 'linux', but it returns the same sequence for ctrl+left and left (27,91,68). If I try keylogger in another terminal (with $TERM == 'xterm') I get the codes (27,91,49,59,53,68). But these codes do not move generate the expected output from SSH channel (which would move cursor one word left on a normal linux shell). That is true even if I start

VT100 Terminal Emulation in Windows WPF or Silverlight

你。 提交于 2019-11-28 17:40:50
I'm pondering creating a WPF or Silverlight app that acts just like a terminal window. Except, since it is in WPF/Silverlight, it will be able to 'enhance' the terminal experience with effects, images, etc. I'm trying to figure out the best way to emulate a terminal. I know how to handle the VT100 emulation as far as parsing, etc. But how to display it? I considered using a RichTextBox and essentially converting the VT100 escape codes into RTF. The problem I see with that is performance. The terminal may be getting only a few characters at a time, and to be able to load them into the textbox

Send “C-(” to Emacs in VT100/xterm terminal (Mac OS X's Terminal)?

雨燕双飞 提交于 2019-11-27 08:29:30
Is it possible in any way to send the key "C-(" to Emacs over a VT100/xterm terminal (Mac OS X Terminal)? Is there an escape sequence that could be sent to achieve the equivalent? I suspect the fundamental problem is that the concept of combining control with the character "(" (and other such characters that are produced using shift) does not exist. Note: Using Cocoa Emacs is not an option. And the reason for needing "C-(" is that paredit.el uses it amongst other key combinations, and it would be preferable to not remap it (because it makes sense to have it on "C-("). A VT100 terminal couldn't

Colored text output in PowerShell console using ANSI / VT100 codes

假装没事ソ 提交于 2019-11-27 01:38:06
问题 I wrote a program which prints a string, which contains ANSI escape sequences to make the text colored. But it doesn't work as expected in the default Windows 10 console, as you can see in the screenshot. The program output appears with the escape sequences as printed characters. If I feed that string to PowerShell via a variable or piping, the output appears as intended (red text). How can I achieve that the program prints colored text without any workarounds? This is my program source

Send “C-(” to Emacs in VT100/xterm terminal (Mac OS X's Terminal)?

∥☆過路亽.° 提交于 2019-11-26 17:45:39
问题 Is it possible in any way to send the key "C-(" to Emacs over a VT100/xterm terminal (Mac OS X Terminal)? Is there an escape sequence that could be sent to achieve the equivalent? I suspect the fundamental problem is that the concept of combining control with the character "(" (and other such characters that are produced using shift) does not exist. Note: Using Cocoa Emacs is not an option. And the reason for needing "C-(" is that paredit.el uses it amongst other key combinations, and it