Hello,

With this script, after ctrl-d, ctrl-c exception not catch.
Is it a python bug or a wrong exception usage? Thanks.
If with import readline, this problem disappears.

-- qiyong


def parse():
        try:
                answer = raw_input("Eo: ")
                print answer
        except EOFError:
                print("EOF")
        except KeyboardInterrupt:
                print("")

def main():
        while True:
                parse()

if __name__ == "__main__":
        main()


-- 
Qi Yong
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to