12. 表示の制御
● 特殊なバイトシーケンスを送り込む
● 0x1B (ESCのコード)を先頭にして続くバイト列で色々な
パラメータや制御を指定する
Python 3.3.2 (default, Sep 15 2013, 10:43:16)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("x1b[31mHello color worldx1b[0m")
Hello color world
>>>
● 端末の機種ごとにコマンドが違う
● DEC VT-100が広く使われたのでデファクトに
● ANSIエスケープシーケンスはVT-100のサブセット