VT100 in Python

Nobody nobody at nowhere.com
Thu Sep 17 05:49:19 EDT 2009


On 2009年9月14日 04:29:57 -0500, Nick Craig-Wood wrote:
> At a basic level parsing VT100 is quite easy, so you can get rid of
> the VT100 control. They start with ESC, have other characters in the
> middle then end with a letter (upper or lowercase), so a regexp will
> make short work of them. Something like r"\x1B[^A-Za-z]*[A-Za-z]"

While this pattern is common, unfortunately there are some exceptions.
Also, "vt100" has become a generic term for "terminal emulation". There
is no guarantee that the OP actually wants to parse vt100 escapes and
nothing else.


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /