qq mises au point de l'installateur.
[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
12 def main(wiimoteSupport) :
13 import pygame
14 from app import MinWii
15 pygame.init()
16 minwii = MinWii(wiimoteSupport=wiimoteSupport)
17 minwii.run()
18 pygame.quit()
19
20 if __name__ == "__main__" :
21 from os.path import realpath, sep
22 import sys
23 from optparse import OptionParser
24
25 usage = "%prog [options]"
26 op = OptionParser(usage)
27
28 op.add_option("--no-wii", dest="wiimoteSupport"
29 , action="store_false"
30 , default=True
31 , help = u"désactivation du support des wiimotes"
32 u" [%default]")
33
34 options, args = op.parse_args()
35 wiimoteSupport = options.wiimoteSupport
36
37 minwiipath = realpath(__file__).split(sep)
38 minwiipath = minwiipath[:-2]
39 minwiipath = sep.join(minwiipath)
40 sys.path.insert(1, minwiipath)
41 main(wiimoteSupport)