X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/e7854ed82aa375273bfbf772493739f875817061..46f3ffd7fdde386f41020171b5733e55a8e64a85:/src/minwii/start.py diff --git a/src/minwii/start.py b/src/minwii/start.py new file mode 100755 index 0000000..dd0b0d5 --- /dev/null +++ b/src/minwii/start.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +""" +lancement de l'application winwii + +$Id$ +$URL$ +""" + + + +def main(wiimoteSupport) : + import pygame + from minwii import MinWii + pygame.init() + minwii = MinWii(wiimoteSupport=wiimoteSupport) + minwii.run() + pygame.quit() + +if __name__ == "__main__" : + from os.path import realpath, sep + import sys + from optparse import OptionParser + + usage = "%prog [options]" + op = OptionParser(usage) + + op.add_option("--no-wii", dest="wiimoteSupport" + , action="store_false" + , default=True + , help = u"désactivation du support des wiimotes" + u" [%default]") + + options, args = op.parse_args() + wiimoteSupport = options.wiimoteSupport + + minwiipath = realpath(__file__).split(sep) + minwiipath = minwiipath[:-2] + minwiipath = sep.join(minwiipath) + sys.path.insert(1, minwiipath) + main(wiimoteSupport) \ No newline at end of file