2011-03-30から1日間の記事一覧
12.1 ブロックしない大量のwrite import os, sys, fcntl buf = sys.stdin.read() print >>sys.stderr, "read {0} bytes".format(len(buf)) wrote = 0 fno = sys.stdout.fileno() val = fcntl.fcntl(fno, fcntl.F_GETFL, 0) fcntl.fcntl(fno, fcntl.F_SETFL, …