このBlogは移転しました。今後は aish.dev を御覧ください。

2011-03-29から1日間の記事一覧

Pythonで学ぶ「詳解 UNIXプログラミング」(その11) 第11章 端末入出力

11.1 割り込み文字を無効にし、ファイルの終わりの文字を変更する import os, sys, termios if not os.isatty(0): sys.exit("standard input is not a terminal device") vdisable = os.fpathconf(sys.stdin.fileno(), "PC_VDISABLE") if vdisable < 0: sys.…