quitとexitについてどうでもいいこと
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> try: ... quit() ... except SystemExit: ... pass ... >>> sys.stdin.readline() Traceback (most recent call last): File "", line 1, in ValueError: I/O operation on closed file oh! python 2.5 から呼び出し可能になった exit と quit(両方ともQuitterクラスオブジェクト?)は、どうも stdin を閉じてしまうようですばい。