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