#!/usr/bin/python import cwiid import sys import time def main(): print 'appuyer sur les butons 1 & 2' if len(sys.argv) > 1: wiimote = cwiid.Wiimote(sys.argv[1]) else: wiimote = cwiid.Wiimote() wiimote.rumble = 1 time.sleep(3) wiimote.rumble = 0 exit = 0 while not exit: c = sys.stdin.read(1) if c == 'x': exit = -1; elif c == '\n': pass else: print 'invalid option' wiimote.close() main()