bugfix.
[minwii.git] / src / app / 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(wimoteSupport) :
13 import pygame
14 from minwii import MinWii
15
16 pygame.init()
17 #modeResolution = (1024,768)
18 #modeResolution = (600,480)
19 #pygame.display.set_mode(modeResolution, pygame.NOFRAME)#, pygame.FULLSCREEN)
20 MinWii(wimoteSupport=wimoteSupport)
21 # from gui.PGUConfiguration import PGUConfiguration
22 # pygame.init()
23 # modeResolution = (1024,768)
24 # window = pygame.display.set_mode(modeResolution)#,pygame.FULLSCREEN)
25 # pgu = PGUConfiguration(window)
26 pygame.quit()
27
28 if __name__ == "__main__" :
29 from os.path import realpath, sep
30 import sys
31 from optparse import OptionParser
32
33 usage = "%prog instance_home products_conf_file [options]"
34 op = OptionParser(usage)
35
36 op.add_option("--no-wii", dest="wimoteSupport"
37 , action="store_false"
38 , default=True
39 , help = u"désactivation du support des wiimotes"
40 u" [%default]")
41
42 options, args = op.parse_args()
43 wimoteSupport = options.wimoteSupport
44
45 minwiipath = realpath(__file__).split(sep)
46 minwiipath = minwiipath[:-2]
47 minwiipath = sep.join(minwiipath)
48 sys.path.insert(1, minwiipath)
49 main(wimoteSupport)