En Tue, 30 Jan 2007 05:50:29 -0300, <[EMAIL PROTECTED]> escribió: > How can I know the Key c and Ctrl on the keyboard are pressed? Or how > to let the program press the > > key Ctrl+c automatically? I just want to use python to develop a > script program. > gear
If you are on Windows and want to trap the Ctrl-C combination, just catch the KeyboardInterrupt exception: --- cut --- from time import sleep while 1: try: sleep(1) except KeyboardInterrupt: print "Ctrl-C pressed" --- cut --- -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list