Reprise modifs ld
[minwii.git] / src / minwii / start.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """
4 lancement de l'application winwii
5
6 $Id$
7 $URL$
8 """
9
10
11 from optparse import OptionParser
12 import pygame
13 from app import MinWii
14
15 def main(wiimoteSupport, fullscreen) :
16 pygame.init()
17 minwii = MinWii(wiimoteSupport=wiimoteSupport, fullscreen=fullscreen)
18 minwii.run()
19 pygame.quit()
20
21 if __name__ == "__main__" :
22 usage = "%prog [options]"
23 op = OptionParser(usage)
24
25 op.add_option("--no-wii", dest="wiimoteSupport"
26 , action="store_false"
27 , default=True
28 , help = u"désactivation du support des wiimotes"
29 u" [%default]")
30
31 op.add_option("--fullscreen", dest="fullscreen"
32 , action="store_true"
33 , default=False
34 , help = u"activation du mode plein écran"
35 u" [%default]")
36 options, args = op.parse_args()
37
38 main(options.wiimoteSupport, options.fullscreen)